Sat Feb 17 00:15:20 1996 Tom Tromey <tromey@creche.cygnus.com>
+ * automake.in (am_install_var): Error if primary variable actually
+ defined.
+ (am_install_var): Skip elements that look like configure
+ substitutions.
+ (am_install_var): "EXTRA" is a valid prefix.
+ (am_install_var): Push contents EXTRA_PRIMARY onto @result.
+ (handle_merge_targets): Treat "all" target like "install".
+ (handle_subdirs): Don't push all-recursive.
+
+ * header.am (install-@DIR@HEADERS): Don't depend on all.
+ * data.am (install-@DIR@DATA): Don't depend on all.
+ * libraries.am (install-@DIR@LIBRARIES): Don't depend on all.
+ * programs.am (install-@DIR@PROGRAMS): Don't depend on all.
+ * scripts.am (install-@DIR@SCRIPTS): Don't depend on all.
+
+ * automake.in (am_install_var): Push generated install targets
+ onto @phony.
+
* subdirs.am: No longer depend on Makefile and $(CONFIG_HEADER).
* automake.in (handle_merge_targets): Correctly handle recursive
calls of uninstall, install-exec, and install-data.
maintainer-clean-binSCRIPTS:
-install-binSCRIPTS: all
+install-binSCRIPTS: $(bin_SCRIPTS)
$(top_srcdir)/mkinstalldirs $(bindir)
for p in $(bin_SCRIPTS); do \
if test -f $$p; then \
maintainer-clean-info:
rm -f $(INFOS)
-install-pkgdataDATA: all
+install-pkgdataDATA: $(pkgdata_DATA)
$(top_srcdir)/mkinstalldirs $(pkgdatadir)
for p in $(pkgdata_DATA); do \
$(INSTALL_DATA) $(srcdir)/$$p $(pkgdatadir)/$$p; \
chmod -R a+r $(distdir)
tar chozf $(distdir).tar.gz $(distdir)
rm -rf $(distdir)
-all: $(INFO_DEPS) $(SCRIPTS) $(DATA) all-recursive Makefile
-
info: $(INFO_DEPS) info-recursive
dvi: $(DVIS) dvi-recursive
installcheck: installcheck-recursive
+all-am: $(INFO_DEPS) $(SCRIPTS) $(DATA) Makefile
+
install-exec-am: install-binSCRIPTS
install-data-am: install-info install-pkgdataDATA
uninstall: uninstall-recursive uninstall-am
+all: all-recursive all-am
+
installdirs: installdirs-recursive
$(top_srcdir)/mkinstalldirs $(bindir) $(infodir) $(pkgdatadir)
.PHONY: default mostlyclean-binSCRIPTS distclean-binSCRIPTS \
clean-binSCRIPTS maintainer-clean-binSCRIPTS uninstall-binSCRIPTS \
- mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
- install-info uninstall-info mostlyclean-info distclean-info \
- clean-info maintainer-clean-info uninstall-pkgdataDATA \
- install-data-recursive uninstall-data-recursive \
- install-exec-recursive uninstall-exec-recursive \
- installdirs-recursive uninstalldirs-recursive all-recursive \
- check-recursive installcheck-recursive info-recursive dvi-recursive \
+ install-binSCRIPTS mostlyclean-vti distclean-vti clean-vti \
+ maintainer-clean-vti install-info uninstall-info mostlyclean-info \
+ distclean-info clean-info maintainer-clean-info \
+ uninstall-pkgdataDATA install-pkgdataDATA install-data-recursive \
+ uninstall-data-recursive install-exec-recursive \
+ uninstall-exec-recursive installdirs-recursive \
+ uninstalldirs-recursive all-recursive check-recursive \
+ installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags mostlyclean-tags distclean-tags \
- clean-tags maintainer-clean-tags dist all info dvi check \
- installcheck install-exec-am install-data-am uninstall-am \
- install-exec install-data install uninstall installdirs \
- mostlyclean-generic distclean-generic clean-generic \
- maintainer-clean-generic clean mostlyclean distclean \
- maintainer-clean
+ clean-tags maintainer-clean-tags dist info dvi check 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
# Some simple checks:
* Can specify version in AUTOMAKE_OPTIONS
* Most errors recognizable by Emacs' M-x next-error
* Added --verbose option
+* All "primary" variables now obsolete; use EXTRA_PRIMARY to supply
+ configure-generated names
\f
New in 0.29:
* Many bug fixes
* Rewrite clean targets.
* Expand test suite.
+BUGS:
+
NOTE: in handle_merge_targets, 'all' handling is still wrong wrt
subdirs. 'install' should always depend on "local all", whether 'all'
or 'all-am'. Actually, something perplexing is going on. Why does
}
&push_phony_cleaners ('recursive');
- push (@all, "all-recursive");
push (@check, "check-recursive");
push (@installcheck, "installcheck-recursive");
push (@info, "info-recursive");
push (@all, 'Makefile');
push (@all, $config_name)
if $config_name && &dirname ($config_name) eq $relative_dir;
- &do_one_merge_target ('all', @all);
+
&do_one_merge_target ('info', @info);
&do_one_merge_target ('dvi', @dvi);
# that (eg) "make install-exec" will run "install-exec-recursive"
# if required, but "make install" won't run it twice. Step one is
# to see if the user specified local versions of any of the
- # targets we handle.
- if (defined $contents{'install-exec-local'})
- {
- push (@install_exec, 'install-exec-local');
- }
- if (defined $contents{'install-data-local'})
- {
- push (@install_data, 'install-data-local');
- }
- if (defined $contents{'uninstall-local'})
- {
- push (@uninstall, 'uninstall-local');
- }
+ # 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'};
+ push (@install_data, 'install-data-local')
+ if defined $contents{'install-data-local'};
+ push (@uninstall, 'uninstall-local')
+ if defined $contents{'uninstall-local'};
+ push (@all, 'all-local')
+ if defined $contents{'all-local'};
if (defined $contents{'install-local'})
{
{
push (@install, 'install-recursive');
+ if (@all)
+ {
+ $output_rules .= ('all-am: '
+ . join (' ', @all)
+ . "\n\n");
+ @all = ('all-recursive', 'all-am');
+ push (@phony, 'all-am');
+ }
+ else
+ {
+ @all = ('all-recursive');
+ }
if (@install_exec)
{
$output_rules .= ('install-exec-am: '
. join (' ', @uninstall)
. "\n\n");
push (@phony, 'install', 'uninstall');
+
+ $output_rules .= ('all: '
+ . join (' ', @all)
+ . "\n\n");
+ push (@phony, 'all');
}
# Helper for handle_merge_targets.
local (@used) = ();
local (@result) = ();
+ # Now that configure substitutions are allowed in where_HOW
+ # variables, it is an error to actually define the primary.
+ &am_line_error ($primary, "\`$primary' is an anachronism")
+ if defined $contents{$primary};
+
local ($clean_file) = $file . '-clean';
local ($one_name);
local ($X);
$one_name = $X . '_' . $primary;
if (defined $contents{$one_name})
{
- # Append actual contents to result.
- push (@result, split (/\s+/, $contents{$one_name}));
+ # Append actual contents to result. Skip elements that
+ # look like configure substitutions.
+ push (@result, grep (! /^\@.*\@$/,
+ split (/\s+/, $contents{$one_name})));
if ($do_clean)
{
if ($exec_dir_p{$X})
{
push (@install_exec, 'install-' . $X . $primary);
+ push (@phony, 'install-' . $X . $primary);
}
else
{
push (@install_data, 'install-' . $X . $primary);
+ push (@phony, 'install-' . $X . $primary);
}
}
}
- if (! defined $contents{$primary} && @used)
+ if (@used)
{
# Define it.
&pretty_print ($primary . ' =', '', @used);
}
# Push here because PRIMARY might be configure time determined.
- push (@all, '$(' . $primary . ')') if ($do_all && @used);
+ push (@all, '$(' . $primary . ')')
+ if $do_all && @used;
# Look for misspellings. It is an error to have a variable ending
# in a "reserved" suffix whose prefix is unknown, eg
# "bni_PROGRAMS".
local (%valid, $varname);
grep ($valid{$_} = 0, @prefixes);
+ $valid{'EXTRA'} = 0;
foreach $varname (keys %contents)
{
if ($varname =~ /^(.*)_$primary$/ && ! defined $valid{$1})
}
}
+ push (@result, split (/\s+/, $contents{'EXTRA_' . $primary}))
+ if defined $contents{'EXTRA_' . $primary};
+
return (@result);
}
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_DATA) here; otherwise conditional
-## data will always be built.
-install-@DIR@DATA: all
+install-@DIR@DATA: $(@DIR@_DATA)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_DATA); do \
$(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
-## headers will always be built.
-install-@DIR@HEADERS: all
+install-@DIR@HEADERS: $(@DIR@_HEADERS)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_HEADERS); do \
$(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_DATA) here; otherwise conditional
-## data will always be built.
-install-@DIR@DATA: all
+install-@DIR@DATA: $(@DIR@_DATA)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_DATA); do \
$(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
-## headers will always be built.
-install-@DIR@HEADERS: all
+install-@DIR@HEADERS: $(@DIR@_HEADERS)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_HEADERS); do \
$(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
-## scripts will always be built.
-install-@DIR@SCRIPTS: all
+install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_SCRIPTS); do \
if test -f $$p; then \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_LIBRARIES) here; otherwise conditional
-## libraries will always be built.
-install-@DIR@LIBRARIES: all
+install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_LIBFILES); do \
if test -f $$p; then \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_PROGRAMS) here; otherwise conditional
-## executables will always be built.
-install-@DIR@PROGRAMS: all
+install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_PROGRAMS); do \
if test -f $$p; then \
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
-## scripts will always be built.
-install-@DIR@SCRIPTS: all
+install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
$(top_srcdir)/mkinstalldirs $(@DIR@dir)
for p in $(@DIR@_SCRIPTS); do \
if test -f $$p; then \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
done
-all: Makefile
-
info:
dvi:
uninstall:
+all: Makefile
+
installdirs:
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: default tags dist all info dvi check-local check installcheck \
- install-exec install-data install uninstall installdirs \
+.PHONY: default tags dist info dvi check-local check installcheck \
+ install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean