+Sat Apr 27 11:39:10 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (handle_configure): Set mkinstalldirs variable
+ here.
+ (handle_dist_worker): Explicitly set distdir in subdir makes.
+ (handle_dist): Handle separate distdir target.
+ (handle_dist_worker): Only generate distdir target.
+
+ * texinfos.am (install-info): Use $(mkinstalldirs).
+ * scripts.am (install-@DIR@SCRIPTS): Use $(mkinstalldirs).
+ * programs.am (install-@DIR@PROGRAMS): Use $(mkinstalldirs).
+ * libraries.am (install-@DIR@LIBRARIES): Use $(mkinstalldirs).
+ * header.am (install-@DIR@HEADERS): Use $(mkinstalldirs).
+ * data.am (install-@DIR@DATA): Use $(mkinstalldirs).
+
+ * automake.in (read_am_file): Set mkinstalldirs variable.
+ (handle_man_pages): Use it.
+ (handle_installdirs): Ditto.
+
Fri Apr 26 15:10:48 1996 Tom Tromey <tromey@creche.cygnus.com>
* automake.in (handle_man_pages): Fix mkinstalldirs invocation.
ETAGS_ARGS = automake.in --lang=none \
--regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
ACLOCAL = aclocal.m4
+mkinstalldirs = $(top_srcdir)/mkinstalldirs
SCRIPTS = $(bin_SCRIPTS) $(pkgdata_SCRIPTS)
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
+
+TAR = tar
default: all
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
install-binSCRIPTS: $(bin_SCRIPTS)
- $(top_srcdir)/mkinstalldirs $(bindir)
+ $(mkinstalldirs) $(bindir)
list="$(bin_SCRIPTS)"; for p in $$list; do \
if test -f $$p; then \
$(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
done
install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS)
- $(top_srcdir)/mkinstalldirs $(pkgdatadir)
+ $(mkinstalldirs) $(pkgdatadir)
list="$(pkgdata_SCRIPTS)"; for p in $$list; do \
if test -f $$p; then \
$(INSTALL_SCRIPT) $$p $(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
install-info: $(INFO_DEPS)
- $(top_srcdir)/mkinstalldirs $(infodir)
+ $(mkinstalldirs) $(infodir)
for file in $(INFO_DEPS); do \
for ifile in `cd $(srcdir) && echo $$file*`; do \
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
rm -f $(INFOS)
install-pkgdataDATA: $(pkgdata_DATA)
- $(top_srcdir)/mkinstalldirs $(pkgdatadir)
+ $(mkinstalldirs) $(pkgdatadir)
list="$(pkgdata_DATA)"; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
$(INSTALL_DATA) $(srcdir)/$$p $(pkgdatadir)/$$p; \
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
-dist: $(DEP_DISTFILES)
+dist: distdir
+ chmod -R a+r $(distdir)
+ $(TAR) chozf $(distdir).tar.gz $(distdir)
+ rm -rf $(distdir)
+distdir: $(DEP_DISTFILES)
@if sed 15q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) dist) || exit 1; \
+ (cd $$subdir && $(MAKE) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
done
- chmod -R a+r $(distdir)
- tar chozf $(distdir).tar.gz $(distdir)
- rm -rf $(distdir)
info: $(INFO_DEPS) info-recursive
dvi: $(DVIS) dvi-recursive
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
installdirs: installdirs-recursive
- ./mkinstalldirs $(bindir) $(pkgdatadir) $(infodir) $(pkgdatadir)
+ $(mkinstalldirs) $(bindir) $(pkgdatadir) $(infodir) $(pkgdatadir)
mostlyclean-generic:
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 info dvi check 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 \
+clean-tags maintainer-clean-tags distdir info dvi check \
+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
Dieter Baron. Other hooks exist, too.
* Preliminary (unfinished) support for libtool
* Added short option names.
+* Better "dist" support when gluing together multiple packages
\f
New in 0.31:
* Bug fixes
Priorities for release:
-* Fix all mkinstalldirs invocations
-* separate dist and distdir targets, so recursive uses of Automake work ok
* make the auto-dep code crash if GNU make not in use?
(doesn't it already?)
* Add no-remake option
* scripts are installed in $exec_prefix/bin, not $prefix/bin
Bug or feature?
+Bug: the mkinstalldirs code will fail unless the top-level Makefile is
+done first; "automake lib/Makefile Makefile" will fail.
+
+Right now, targets generated internally (eg "install") are not
+overridable by use code. This should probably be possible, even
+though it isn't very important. This could be done by generating all
+internal rules via a function call instead of just appending to
+$output_rules.
+
* Should be a way to have "nobuild_PROGRAMS" which aren't even built,
but which could be by running the magic make command.
if ! $done;
++$done;
+ local ($conf_pat);
+ ($conf_pat = $config_aux_dir) =~ s/(\W)/\\$1/g;
$output_rules .=
&file_contents_with_transform
('s/\@TEXI\@/' . $info_cursor . '/g; '
. 's/\@VTI\@/' . $vti . '/g; '
. 's/\@VTEXI\@/' . $vtexi . '/g;'
- . 's,\@MDDIR\@,' . $config_aux_dir . ',g;',
+ . 's,\@MDDIR\@,' . $conf_pat . ',g;',
'texi-version');
&push_phony_cleaners ($vti);
foreach (keys %sections)
{
push (@installdirs, '$(mandir)/man' . $_);
- $output_rules .= ("\t" . $config_aux_dir
- . '/mkinstalldirs $(mandir)/man'
+ $output_rules .= ("\t" . '$(mkinstalldirs) $(mandir)/man'
. $_ . "\n");
}
push (@phony, 'install-man');
# Generate actual 'dist' (or dist-shar) rule.
sub handle_dist_worker
{
- local ($distshar) = @_;
- local ($target) = $distshar ? 'dist-shar' : 'dist';
-
- $output_rules .= $target . ': $(DEP_DISTFILES)' . "\n";
+ $output_rules .= 'distdir: $(DEP_DISTFILES)' . "\n";
# Initialization; only at top level.
if ($relative_dir eq '.')
if (&variable_defined ('SUBDIRS'))
{
# Test for directory existence here because previous automake
- # invocation might have created some directories.
+ # invocation might have created some directories. Note that
+ # we explicitly set distdir for the subdir make; that lets us
+ # mix-n-match many automake-using packages into one large
+ # package, and have "dist" at the top level do the right
+ # thing.
$output_rules .= ' for subdir in $(SUBDIRS); do \\
test -d $(distdir)/$$subdir \\
|| mkdir $(distdir)/$$subdir \\
|| exit 1; \\
chmod 777 $(distdir)/$$subdir; \\
- (cd $$subdir && $(MAKE) dist) || exit 1; \\
+ (cd $$subdir && $(MAKE) distdir=../$(distdir)/$$subdir distdir) \\
+ || exit 1; \\
done
';
}
$output_rules .= "\t\$(MAKE) dist-hook\n";
}
- # Finalize.
- if ($relative_dir eq '.')
- {
- $output_rules .= ' chmod -R a+r $(distdir)' . "\n\t";
- if ($distshar)
- {
- $output_rules .= 'shar $(distdir) | gzip > $(distdir).shar.gz';
- }
- else
- {
- $output_rules .= '$(TAR) chozf $(distdir).tar.gz $(distdir)';
- }
- $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n";
- }
-
- push (@phony, $target);
+ push (@phony, 'distdir');
}
# Handle 'dist' target.
}
# Generate 'dist' target, and maybe dist-shar.
- &handle_dist_worker (0);
- &handle_dist_worker (1) if defined $options{'dist-shar'};
+ if ($relative_dir eq '.')
+ {
+ $output_rules .= 'dist: distdir' . "\n\t";
+ $output_rules .= 'chmod -R a+r $(distdir)' . "\n\t";
+ $output_rules .= '$(TAR) chozf $(distdir).tar.gz $(distdir)';
+ $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n";
+
+ if (defined $options{'dist-shar'})
+ {
+ $output_rules .= 'dist-shar: distdir' . "\n\t";
+ $output_rules .= 'chmod -R a+r $(distdir)' . "\n\t";
+ $output_rules .= 'shar $(distdir) | gzip > $(distdir).shar.gz';
+ $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n";
+ }
+ }
+
+ # Generate distdir target.
+ &handle_dist_worker;
}
# Handle auto-dependency code.
$top_reldir = '';
}
+ # Set location of mkinstalldirs.
+ if ($config_aux_dir ne '.')
+ {
+ $output_vars .= 'mkinstalldirs = ' . $config_aux_dir;
+ }
+ else
+ {
+ $output_vars .= 'mkinstalldirs = $(top_srcdir)';
+ }
+ $output_vars .= '/mkinstalldirs' . "\n";
+
&am_line_error ('CONFIG_HEADER',
"\`CONFIG_HEADER' is an anachronism; now determined from \`configure.in'")
if &variable_defined ('CONFIG_HEADER');
push (@phony, 'installdirs');
if (@installdirs)
{
- &pretty_print_rule ("\t$config_aux_dir/mkinstalldirs ", "\t\t",
+ &pretty_print_rule ("\t" . '$(mkinstalldirs) ', "\t\t",
@installdirs);
}
$output_rules .= "\n";
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@DATA: $(@DIR@_DATA)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_DATA)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@HEADERS: $(@DIR@_HEADERS)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_HEADERS)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@DATA: $(@DIR@_DATA)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_DATA)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@HEADERS: $(@DIR@_HEADERS)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_HEADERS)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_SCRIPTS)"; for p in $$list; do \
## rebuilt in the build directory. Can't cd to srcdir; that might
## break a possible install-sh reference.
install-info: $(INFO_DEPS)
- $(top_srcdir)/mkinstalldirs $(infodir)
+ $(mkinstalldirs) $(infodir)
for file in $(INFO_DEPS); do \
## We use these strange circumlocutions because we want the "ifile" to
## be relative, for the install.
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_LIBFILES)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_PROGRAMS)"; for p in $$list; do \
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
- $(top_srcdir)/mkinstalldirs $(@DIR@dir)
+ $(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list="$(@DIR@_SCRIPTS)"; for p in $$list; do \
target.test extra.test noinst.test instman.test
EXTRA_DIST = defs $(TESTS)
+mkinstalldirs = $(top_srcdir)/mkinstalldirs
DIST_COMMON = ChangeLog Makefile.am Makefile.in
subdir = tests
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-dist: $(DEP_DISTFILES)
+distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: default tags dist check-TESTS info dvi check installcheck \
+.PHONY: default tags distdir check-TESTS info dvi check installcheck \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
$AUTOMAKE || exit 1
-grep '[^/]mkinstalldirs' Makefile.in && exit 1
+grep '[^(/]mkinstalldirs' Makefile.in && exit 1
exit 0
## rebuilt in the build directory. Can't cd to srcdir; that might
## break a possible install-sh reference.
install-info: $(INFO_DEPS)
- $(top_srcdir)/mkinstalldirs $(infodir)
+ $(mkinstalldirs) $(infodir)
for file in $(INFO_DEPS); do \
## We use these strange circumlocutions because we want the "ifile" to
## be relative, for the install.