AUTOMAKE_OPTIONS = gnits
MAINT_CHARSET = latin1
-SUBDIRS = tests m4
+SUBDIRS = . tests m4
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
GZIP = --best
-all: all-recursive all-am
-
+all: all-redirect
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
- else\
+ else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
fi; \
done
for subdir in $(SUBDIRS); do \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ if test "$$srcdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
|| exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info: $(INFO_DEPS) info-recursive
-dvi: $(DVIS) dvi-recursive
-check: all-am
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
-installcheck: installcheck-recursive installcheck-local
-all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
-
+info-am: $(INFO_DEPS)
+info: info-recursive
+dvi-am: $(DVIS)
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am: installcheck-local
+installcheck: installcheck-recursive
install-exec-am: install-binSCRIPTS
+install-exec: install-exec-recursive
-install-data-am: install-info-am install-pkgdataSCRIPTS install-pkgdataDATA
-
-uninstall-am: uninstall-binSCRIPTS uninstall-pkgdataSCRIPTS uninstall-info uninstall-pkgdataDATA
-
-install-exec: install-exec-recursive install-exec-am
- @$(NORMAL_INSTALL)
-
-install-data: install-data-recursive install-data-am
- @$(NORMAL_INSTALL)
-
-install: install-recursive install-exec-am install-data-am
- @:
-
-uninstall: uninstall-recursive uninstall-am
+install-data-am: install-info-am install-pkgdataSCRIPTS \
+ install-pkgdataDATA
+install-data: install-data-recursive
+install-am: install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-binSCRIPTS uninstall-pkgdataSCRIPTS \
+ uninstall-info uninstall-pkgdataDATA
+uninstall: uninstall-recursive
+all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
+all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs-recursive
+installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir) \
$(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir)
maintainer-clean-generic:
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-tags \
- mostlyclean-generic
+ mostlyclean-generic clean-am
+
+mostlyclean: mostlyclean-recursive
clean-am: clean-vti clean-aminfo clean-tags clean-generic \
mostlyclean-am
+clean: clean-recursive
+
distclean-am: distclean-vti distclean-aminfo distclean-tags \
distclean-generic clean-am
+ -rm -f config.status
+
+distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
-
-mostlyclean: mostlyclean-recursive mostlyclean-am
-
-clean: clean-recursive clean-am
-
-distclean: distclean-recursive distclean-am
- -rm -f config.status
-
-maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
+maintainer-clean: maintainer-clean-recursive
+
.PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-pkgdataSCRIPTS \
install-pkgdataSCRIPTS mostlyclean-vti distclean-vti clean-vti \
maintainer-clean-vti install-info-am uninstall-info mostlyclean-aminfo \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
-installcheck-local installcheck all-am install-exec-am install-data-am \
-uninstall-am install-exec install-data install uninstall all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-local installcheck-am \
+installcheck install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs-am installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
installcheck-local:
. "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
# Never fail here if a subdir fails; it
# isn't important.
- . "\t (cd \$\$subdir"
+ . "\t test \"\$\$subdir\" = . || (cd \$\$subdir"
. " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
. "\tdone\n");
push (@tag_deps, 'tags-recursive');
# correctly with an enclosing package.
$output_rules .=
("\t" . 'for subdir in $(' . $dist_subdir_name . '); do ' . "\\\n"
- . "\t" . ' test -d $(distdir)/$$subdir ' . "\\\n"
- . "\t" . ' || mkdir $(distdir)/$$subdir ' . "\\\n"
- . "\t" . ' || exit 1; ' . "\\\n"
- . "\t" . ' chmod 777 $(distdir)/$$subdir; ' . "\\\n"
- . "\t" . ' (cd $$subdir'
+ . "\t" . ' if test "$$srcdir" = .; then :; else ' . "\\\n"
+ . "\t" . ' test -d $(distdir)/$$subdir ' . "\\\n"
+ . "\t" . ' || mkdir $(distdir)/$$subdir ' . "\\\n"
+ . "\t" . ' || exit 1; ' . "\\\n"
+ . "\t" . ' chmod 777 $(distdir)/$$subdir; ' . "\\\n"
+ . "\t" . ' (cd $$subdir'
. ' && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$('
. (($relative_dir eq '.') ? 'distdir' : 'top_distdir')
. ') distdir=../$(distdir)/$$subdir distdir) ' . "\\\n"
- . "\t" . ' || exit 1; ' . "\\\n"
+ . "\t" . ' || exit 1; ' . "\\\n"
+ . "\t" . ' fi; ' . "\\\n"
. "\tdone\n");
}
# If the target `dist-hook' exists, make sure it is run. This
# allows users to do random weird things to the distribution
# before it is packaged up.
- push (@dist_targets, 'dist-hook') if defined $contents{'dist-hook'};
+ push (@dist_targets, 'dist-hook') if &target_defined ('dist-hook');
local ($targ);
foreach $targ (@dist_targets)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \\'
- . (defined $contents{'distcheck-hook'}
+ . (&target_defined ('distcheck-hook')
? ("\t\$(MAKE) \$(AM_MAKEFLAGS)"
. " distcheck-hook")
: '')
}
&push_phony_cleaners ('recursive');
- push (@check_tests, "check-recursive");
- push (@installcheck, "installcheck-recursive");
- push (@info, "info-recursive");
- push (@dvi, "dvi-recursive");
-
$recursive_install = 1;
}
sub handle_installdirs
{
# GNU Makefile standards recommend this.
- $output_rules .= ("installdirs:"
- . ($recursive_install
- ? " installdirs-recursive\n"
- : "\n"));
+ if ($recursive_install)
+ {
+ # We create a separate `-am' target so that the -recursive
+ # rule will work correctly.
+ $output_rules .= ("installdirs: installdirs-recursive\n"
+ . "installdirs-am:\n");
+ push (@phony, 'installdirs-am');
+ }
+ else
+ {
+ $output_rules .= "installdirs:\n";
+ }
push (@phony, 'installdirs');
if (@installdirs)
{
if (defined $options{'no-installinfo'})
{
- # FIXME: this is kind of a hack; should find another way to
- # know that this is required.
- local (@dirs);
- if (grep ($_ eq 'install-info-am', @phony))
- {
- push (@dirs, 'install-info-am');
- }
- if (&variable_defined ('SUBDIRS'))
- {
- push (@dirs, 'install-info-recursive');
- }
- &do_one_merge_target ('install-info', @dirs);
+ &do_one_merge_target ('install-info', '');
+ }
+ elsif (&target_defined ('install-info-local'))
+ {
+ &am_line_error ('install-info-local',
+ "\`install-info-local' target defined but \`no-installinfo' option not in use");
}
# Handle the various install targets specially. We do this so
# targets we handle. "all" is treated as one of these since
# "install" can run it.
push (@install_exec, 'install-exec-local')
- if defined $contents{'install-exec-local'};
+ if &target_defined ('install-exec-local');
push (@install_data, 'install-data-local')
- if defined $contents{'install-data-local'};
+ if &target_defined ('install-data-local');
push (@uninstall, 'uninstall-local')
- if defined $contents{'uninstall-local'};
+ if &target_defined ('uninstall-local');
local ($utarg);
foreach $utarg ('uninstall-data-local', 'uninstall-data-hook',
'uninstall-exec-local', 'uninstall-exec-hook')
{
- if (defined $contents{$utarg})
+ if (&target_defined ($utarg))
{
local ($x);
($x = $utarg) =~ s/(data|exec)-//;
}
}
push (@all, 'all-local')
- if defined $contents{'all-local'};
+ if &target_defined ('all-local');
- if (defined $contents{'install-local'})
+ if (&target_defined ('install-local'))
{
&am_line_error ('install-local',
- "use \`install-data' or \`install-exec', not \`install'");
+ "use \`install-data-local' or \`install-exec-local', not \`install-local'");
}
- # Step two: if we are doing recursive makes, write out the
- # appropriate rules.
- local (@install);
- if ($recursive_install)
+ if (@all)
{
- push (@install, 'install-recursive');
-
- if (@all)
+ local ($one_name);
+ local ($local_headers) = '';
+ foreach $one_name (@config_names)
{
- local (@hackall) = ();
- local ($one_name);
- local ($local_headers) = '';
- foreach $one_name (@config_names)
+ if (&dirname ($one_name) eq $relative_dir)
{
- if (&dirname ($one_name) eq $relative_dir)
- {
- $local_headers .= ' ' if $local_headers;
- $local_headers .= &basename ($one_name);
- }
+ $local_headers .= ' ' if $local_headers;
+ $local_headers .= &basename ($one_name);
}
- if ($local_headers)
- {
-
- # This is kind of a hack, but I couldn't see a better
- # way to handle it. In this particular case, we need
- # to make sure config.h is built before we recurse.
- # We can't do this by changing the order of
- # dependencies to the "all" because that breaks when
- # using parallel makes. Instead we handle things
- # explicitly.
- $output_rules .= ("all-recursive-am: ${local_headers}"
+ }
+ if ($local_headers)
+ {
+ # This is kind of a hack, but I couldn't see a better way
+ # to handle it. In this particular case, we need to make
+ # sure config.h is built before we recurse. We can't do
+ # this by changing the order of dependencies to the "all"
+ # because that breaks when using parallel makes. Instead
+ # we handle things explicitly.
+ $output_rules .= ("all-recursive-am: ${local_headers}"
. "\n\t"
. '$(MAKE) $(AM_MAKEFLAGS)'
. " all-recursive"
. "\n\n");
- push (@hackall, 'all-recursive-am');
- push (@phony, 'all-recursive-am');
- }
- else
- {
- push (@hackall, 'all-recursive');
- }
-
- $output_rules .= ('all-am: '
- . join (' ', @all)
- . "\n\n");
- @all = @hackall;
- push (@all, 'all-am');
- push (@phony, 'all-am');
- }
- else
- {
- @all = ('all-recursive');
-
- # Must always generate `all-am' target, so it can be
- # referred to elsewhere.
- $output_rules .= "all-am:\n";
- }
- if (@install_exec)
- {
- $output_rules .= ('install-exec-am: '
- . join (' ', @install_exec)
- . "\n\n");
- @install_exec = ('install-exec-recursive', 'install-exec-am');
- push (@install, 'install-exec-am');
- push (@phony, 'install-exec-am');
- }
- else
- {
- @install_exec = ('install-exec-recursive');
- }
- if (@install_data)
- {
- $output_rules .= ('install-data-am: '
- . join (' ', @install_data)
- . "\n\n");
- @install_data = ('install-data-recursive', 'install-data-am');
- push (@install, 'install-data-am');
- push (@phony, 'install-data-am');
- }
- else
- {
- @install_data = ('install-data-recursive');
- }
- if (@uninstall)
- {
- $output_rules .= ('uninstall-am: '
- . join (' ', @uninstall)
- . "\n\n");
- @uninstall = ('uninstall-recursive', 'uninstall-am');
- push (@phony, 'uninstall-am');
- }
- else
- {
- @uninstall = ('uninstall-recursive');
+ $all_target = 'all-recursive-am';
+ push (@phony, 'all-recursive-am');
}
}
- # Step three: print definitions users can use. Code below knows
- # that install-exec is done before install-data, beware.
- $output_rules .= ("install-exec: "
- . join (' ', @install_exec)
- . "\n");
- $output_rules .= "\t\@\$(NORMAL_INSTALL)\n";
- if (defined $contents{'install-exec-hook'})
+ # Print definitions users can use.
+ &do_one_merge_target ('install-exec', @install_exec);
+ if (&target_defined ('install-exec-hook'))
{
- $output_rules .= ("\t"
- . '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook'
+ $output_rules .= ("\t\@\$(NORMAL_INSTALL)\n"
+ . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook'
. "\n");
}
$output_rules .= "\n";
- push (@install, 'install-exec') if !$recursive_install;
- push (@phony, 'install-exec');
+ push (@install, 'install-exec-am');
- $output_rules .= ("install-data: "
- . join (' ', @install_data)
- . "\n");
- $output_rules .= "\t\@\$(NORMAL_INSTALL)\n";
+ &do_one_merge_target ('install-data', @install_data);
if (defined $contents{'install-data-hook'})
{
- $output_rules .= ("\t"
- . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook'
+ $output_rules .= ("\t\@\$(NORMAL_INSTALL)\n"
+ . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook'
. "\n");
}
$output_rules .= "\n";
- push (@install, 'install-data') if !$recursive_install;
- push (@phony, 'install-data');
-
- # If no dependencies for 'install', add 'all'. Why? That way
- # "make install" at top level of distclean'd distribution won't
- # fail because stuff in 'lib' fails to build.
- if (! @install || (scalar (@install) == 2
- && $install[0] eq 'install-exec'
- && $install[1] eq 'install-data'))
- {
- push (@install, 'all');
- }
- $output_rules .= ('install: '
- . join (' ', @install)
- # Use "@:" as empty command so nothing prints.
- . "\n\t\@:"
- . "\n\n"
- . 'uninstall: '
- . join (' ', @uninstall)
- . "\n\n");
- push (@phony, 'install', 'uninstall');
+ push (@install, 'install-data-am');
+
+ &do_one_merge_target ('install', @install);
+ &do_one_merge_target ('uninstall', @uninstall);
- $output_all = 'all: ' . join (' ', @all) . "\n\n";
- push (@phony, 'all');
+ &do_one_merge_target ('all', @all);
# Generate the new 'install-strip' target. Must set
# INSTALL_SCRIPT to avoid stripping scripts.
. "\n");
}
-# Helper for handle_merge_targets.
+# Helper for handle_merge_targets. Note that handle_merge_targets
+# relies on the fact that this doesn't add an extra \n at the end.
sub do_one_merge_target
{
local ($name, @values) = @_;
- if (defined $contents{$name . '-local'})
+ if (&target_defined ($name . '-local'))
{
# User defined local form of target. So include it.
push (@values, $name . '-local');
push (@phony, $name . '-local');
}
- &pretty_print_rule ($name . ":", "\t\t", @values);
- push (@phony, $name);
+ &pretty_print_rule ($name . "-am:", "\t\t", @values);
+ local ($lname) = $name . ($recursive_install ? '-recursive' : '-am');
+ local ($tname) = $name;
+ # To understand this special case, see handle_merge_targets.
+ if ($name eq 'all')
+ {
+ $tname = 'all-redirect';
+ $lname = $all_target if $recursive_install;
+ push (@phony, 'all-redirect');
+ $output_all = "all: all-redirect\n";
+ }
+ &pretty_print_rule ($tname . ":", "\t\t", $lname);
+ push (@phony, $name . '-am', $name);
}
# Handle check merge target specially.
sub do_check_merge_target
{
- if (defined $contents{'check-local'})
+ if (&target_defined ('check-local'))
{
# User defined local form of target. So include it.
push (@check_tests, 'check-local');
}
# In --cygnus mode, check doesn't depend on all.
- if (! $cygnus_mode)
+ if ($cygnus_mode)
{
- if (! &variable_defined ('SUBDIRS'))
- {
- # 'check' must depend on `all', but not when doing
- # recursive build.
- unshift (@check, 'all');
- }
- else
- {
- # When subdirs are used, do the `all' build and then do
- # all the recursive stuff. Actually use `all-am' because
- # it doesn't recurse; we rely on the check target in the
- # subdirs to do the required builds there.
- unshift (@check, 'all-am');
- }
+ # Just run the local check rules.
+ &pretty_print_rule ('check-am:', "\t\t", @check);
}
-
- # The check target must depend on the local equivalent of `all',
- # to ensure all the primary targets are built. Also it must
- # depend on the test code named in @check.
- &pretty_print_rule ('check:', "\t\t", @check);
-
- # Now the check rules must explicitly run anything named in
- # @check_tests. This is done via a separate make invocation to
- # avoid problems with parallel makes. Every time I write code
- # like this I wonder: how could you invent a parallel make and not
- # provide any real synchronization facilities? The official
- # answer is that you can push the dependencies out to the leaves
- # of the dependency tree. That seems fairly gross to me.
- &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @check_tests)
+ else
+ {
+ # The check target must depend on the local equivalent of
+ # `all', to ensure all the primary targets are built. Then it
+ # must build the local check rules.
+ $output_rules .= "check-am: all-am\n";
+ &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
+ @check)
+ if @check;
+ }
+ &pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
+ @check_tests)
if @check_tests;
+
+ push (@phony, 'check', 'check-am');
+ $output_rules .= ("check: "
+ . ($recursive_install ? 'check-recursive' : 'check-am')
+ . "\n");
}
# Handle all 'clean' targets.
push (@clean, 'generic');
&push_phony_cleaners ('generic');
- local ($target) = $recursive_install ? 'clean-am' : 'clean';
- &do_one_clean_target ($target, 'mostly', '', @clean);
- &do_one_clean_target ($target, '', 'mostly', @clean);
- &do_one_clean_target ($target, 'dist', '', @clean);
- &do_one_clean_target ($target, 'maintainer-', 'dist', @clean);
+ &do_one_clean_target ('clean', 'mostly', '', @clean);
+ &do_one_clean_target ('clean', '', 'mostly', @clean);
+ &do_one_clean_target ('clean', 'dist', '', @clean);
+ &do_one_clean_target ('clean', 'maintainer-', 'dist', @clean);
push (@phony, 'clean', 'mostlyclean', 'distclean', 'maintainer-clean');
-
- local (@deps);
- if ($recursive_install)
- {
- # Do -recursive before -am. If you aren't doing a parallel
- # make, this can be nicer.
- @deps = ('recursive', 'am');
- &do_one_clean_target ('', 'mostly', '', @deps);
- &do_one_clean_target ('', '', '', @deps);
- &do_one_clean_target ('', 'dist', '', @deps);
- &do_one_clean_target ('', 'maintainer-', '', @deps);
- }
}
# Helper for handle_clean.
{
local ($target, $name, $last_name, @deps) = @_;
- # Special case: if target not passed, then don't generate
- # dependency on next "lower" clean target (eg no
- # clean<-mostlyclean derivation). In this case the target is
- # implicitly known to be 'clean'.
- local ($flag) = $target;
- $target = 'clean' if ! $flag;
-
+ # Change each dependency `BLARG' into `clean-BLARG'.
grep (($_ = $name . 'clean-' . $_) && 0, @deps);
- if ($flag)
- {
- if ($last_name || $name ne 'mostly')
- {
- push (@deps, $last_name . $target);
- }
- }
+
+ # Push the previous clean target.
+ push (@deps, $last_name . $target . '-am');
# If a -local version of the rule is given, add it to the list.
- if (defined $contents{$name . $target . '-local'})
+ if (&target_defined ($name . $target . '-local'))
{
push (@deps, $name . $target . '-local');
}
# Print the target and the dependencies.
- &pretty_print_rule ($name . $target . ": ", "\t\t", @deps);
+ &pretty_print_rule ($name . $target . "-am: ", "\t\t", @deps);
# FIXME: shouldn't we really print these messages before running
# the dependencies?
$output_rules .= "\t-rm -f libtool\n" if $seen_libtool;
}
$output_rules .= "\n";
+ $output_rules .= ($name . $target . ": " . $name . $target
+ . ($recursive_install ? '-recursive' : '-am')
+ . "\n\n");
}
# Handle .PHONY target.
# This maps the source extension of a suffix rule to its
# corresponding output extension.
%suffix_rules = ();
+
+ # This is the name of the recursive `all' target to use.
+ $all_target = 'all-recursive';
}