contents.
(dist-all, dist-bzip2, dist-zip, dist-tarZ): New conditional
targets.
And BTW, all these guys are phony.
* automake.in (&handle_dist_worker): As its name doesn't indicate,
output distributions.
(&handle_dist): As its name doesn't indicate, don't.
(&initialize_global_constants): Don't define variables which
content is now handled by distdir.am.
But register `dist-all' as a factored target.
(&handle_factored_dependencies): Don't output empty targets.
+2001-02-21 Akim Demaille <akim@epita.fr>
+
+ * distdir.am (distdir): Be sure to have permissive rights on its
+ contents.
+ (dist-all, dist-bzip2, dist-zip, dist-tarZ): New conditional
+ targets.
+ And BTW, all these guys are phony.
+ * automake.in (&handle_dist_worker): As its name doesn't indicate,
+ output distributions.
+ (&handle_dist): As its name doesn't indicate, don't.
+ (&initialize_global_constants): Don't define variables which
+ content is now handled by distdir.am.
+ But register `dist-all' as a factored target.
+ (&handle_factored_dependencies): Don't output empty targets.
+
2001-02-20 Tom Tromey <tromey@redhat.com>
* m4/init.m4 (AM_INIT_AUTOMAKE): Simplify m4_pattern_allow
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
-dist: distdir
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-dist-all: distdir
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
distdir: $(DISTFILES)
- @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
+ @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; then :; else \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
fi
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. .
@for file in $(DISTFILES); do \
|| exit 1; \
fi; \
done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+
+dist: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info-am: $(INFO_DEPS)
info: info-recursive
uninstall: uninstall-recursive
all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \
clean-am: clean-generic mostlyclean-am
+dist-all: dist
+
distclean: distclean-recursive
-rm -f config.status
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
.PHONY: all all-am all-recursive check check-am check-recursive clean \
- clean-generic clean-recursive distclean distclean-generic \
- distclean-recursive distclean-tags distdir dvi dvi-am \
- dvi-recursive info info-am info-recursive install install-am \
- install-binSCRIPTS install-data install-data-am \
+ clean-generic clean-recursive dist dist-all distclean \
+ distclean-generic distclean-recursive distclean-tags distdir \
+ dvi dvi-am dvi-recursive info info-am info-recursive install \
+ install-am install-binSCRIPTS install-data install-data-am \
install-data-recursive install-dist_pkgdataDATA \
install-dist_scriptDATA install-exec install-exec-am \
install-exec-recursive install-info-am install-recursive \
-New in 1.4d:
+New in 1.4e:
* Support for `configure.ac'.
New in 1.4b:
-# aclocal.m4 generated automatically by aclocal 1.4e
+# aclocal.m4 generated automatically by aclocal 1.4c
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
$output_rules .=
&file_contents ('distdir',
$xform
- . &transform_cond ('CYGNUS' => $cygnus_mode,
- 'SUBDIRS'
- => &variable_defined ('SUBDIRS')));
+ . &transform_cond ('CYGNUS' => $cygnus_mode,
+ 'SHAR' => $options{'dist-shar'},
+ 'BZIP2' => $options{'dist-bzip2'},
+ 'ZIP' => $options{'dist-zip'},
+ 'COMPRESS' => $options{'dist-tarZ'},
+ 'SUBDIRS' =>
+ &variable_defined ('SUBDIRS')));
# If the target `dist-hook' exists, make sure it is run. This
# allows users to do random weird things to the distribution
# Arg, this file should have been named `distcheck'.
$output_rules .= &file_contents ('dist', $xform);
-
- local ($dist_all) = ('dist-all: distdir' . "\n"
- . $dist_header);
- local ($curs);
- foreach $curs ('dist', 'dist-shar', 'dist-zip', 'dist-tarZ',
- 'dist-bzip2')
- {
- if (defined $options{$curs} || $curs eq 'dist')
- {
- $output_rules .= ($curs . ': distdir' . "\n"
- . $dist_header
- . $dist{$curs}
- . $dist_trailer);
- $dist_all .= $dist{$curs};
- }
- }
- $output_rules .= $dist_all . $dist_trailer;
}
# Generate distdir target.
{
foreach (sort target_cmp keys %dependencies)
{
+ # If there is nothing about this guy, skip it.
+ next
+ unless @{$dependencies{$_}} || $actions{$_};
&pretty_print_rule ("$_:", "\t",
sort @{$dependencies{$_}});
$output_rules .= $actions{$_};
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
";
-
- # This complex find command will try to avoid changing the modes of
- # links into the source tree, in case they're hard-linked. It will
- # also make directories writable by everybody, because some
- # brain-dead tar implementations change ownership and permissions of
- # a directory before extracting the files, thus becoming unable to
- # extract them.
- # Ignore return result from chmod, because it might give an error
- # if we chmod a symlink.
- # Another nastiness: if the file is unreadable by us, we make it
- # readable regardless of the number of links to it. This only
- # happens in perverse cases.
- # We use $(install_sh) because that is a known-portable way to
- # modify the file in place in the source tree.
- $dist_header = ' -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \\
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \\
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \\
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \\
- || chmod -R a+r $(distdir)
-';
- $dist{'dist-bzip2'} = ("\t"
- . '$(AMTAR) chof - $(distdir) | bzip2 -9 -c > $(distdir).tar.bz2'
- . "\n");
- $dist{'dist-tarZ'} = ("\t"
- . '$(AMTAR) chof - $(distdir) | compress -c > $(distdir).tar.Z'
- . "\n");
- $dist{'dist-shar'} = ("\t"
- . 'shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).shar.gz'
- . "\n");
- $dist{'dist-zip'} = ("\t" . '-rm -f $(distdir).zip' . "\n" .
- "\t" . 'zip -rq $(distdir).zip $(distdir)' . "\n");
-
- # Note that we don't use GNU tar's `-z' option. One reason (but
- # not the only reason) is that some versions of tar (e.g., OSF1)
- # interpret `-z' differently.
- $dist{'dist'} = ("\t"
- . '$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz'
- . "\n");
- $dist_trailer = "\t" . '-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)' . "\n";
}
# (Re)-Initialize per-Makefile.am variables.
'mostlyclean' => [],
'maintainer-clean' => [],
'distclean' => [],
+
+ # Building all the flavors of distributions.
+ 'dist-all' => [],
+
'.PHONY' => []
);
# Holds the factored actions. Tied to %DEPENDENCIES, i.e., filled
## For Gnits users, this is pretty handy. Look at 15 lines
## in case some explanatory text is desirable.
##
-?TOPDIR??CK-NEWS? @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
+?TOPDIR??CK-NEWS? @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; then :; else \
?TOPDIR??CK-NEWS? echo "NEWS not updated; not releasing" 1>&2; \
?TOPDIR??CK-NEWS? exit 1; \
?TOPDIR??CK-NEWS? fi
##
## Only for the top dir.
##
-?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+?TOPDIR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
?TOPDIR? mkdir $(distdir)
##
##
?SUBDIRS? || exit 1; \
?SUBDIRS? fi; \
?SUBDIRS? done
+##
+## This complex find command will try to avoid changing the modes of
+## links into the source tree, in case they're hard-linked. It will
+## also make directories writable by everybody, because some
+## brain-dead tar implementations change ownership and permissions of
+## a directory before extracting the files, thus becoming unable to
+## extract them.
+##
+## Ignore return result from chmod, because it might give an error
+## if we chmod a symlink.
+##
+## Another nastiness: if the file is unreadable by us, we make it
+## readable regardless of the number of links to it. This only
+## happens in perverse cases.
+##
+## We use $(install_sh) because that is a known-portable way to modify
+## the file in place in the source tree.
+##
+?TOPDIR? -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+?TOPDIR? ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+?TOPDIR? ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+?TOPDIR? ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+?TOPDIR? || chmod -R a+r $(distdir)
+
+
+
+
+## --------------------------------------- ##
+## Building various distribution flavors. ##
+## --------------------------------------- ##
+
+## Note that we don't use GNU tar's `-z' option. One reason (but not
+## the only reason) is that some versions of tar (e.g., OSF1)
+## interpret `-z' differently.
+
+?TOPDIR?.PHONY: dist-all dist
+?TOPDIR?dist-all: dist
+?TOPDIR?dist: distdir
+?TOPDIR? $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+?TOPDIR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2
+?TOPDIR??BZIP2?.PHONY: dist-bzip2
+?TOPDIR??BZIP2?dist-bzip2: distdir
+?TOPDIR??BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+?TOPDIR??BZIP2? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??COMPRESS?.PHONY dist-all: dist-tarZ
+?TOPDIR??COMPRESS?dist-tarZ: distdir
+?TOPDIR??COMPRESS? $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+?TOPDIR??COMPRESS? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??SHAR?.PHONY dist-all: dist-shar
+?TOPDIR??SHAR?dist-shar: distdir
+?TOPDIR??SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+?TOPDIR??SHAR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??ZIP?.PHONY dist-all: dist-zip
+?TOPDIR??ZIP?dist-zip: distdir
+?TOPDIR??ZIP? -rm -f $(distdir).zip
+?TOPDIR??ZIP? zip -rq $(distdir).zip $(distdir)
+?TOPDIR??ZIP? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
## For Gnits users, this is pretty handy. Look at 15 lines
## in case some explanatory text is desirable.
##
-?TOPDIR??CK-NEWS? @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
+?TOPDIR??CK-NEWS? @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; then :; else \
?TOPDIR??CK-NEWS? echo "NEWS not updated; not releasing" 1>&2; \
?TOPDIR??CK-NEWS? exit 1; \
?TOPDIR??CK-NEWS? fi
##
## Only for the top dir.
##
-?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+?TOPDIR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
?TOPDIR? mkdir $(distdir)
##
##
?SUBDIRS? || exit 1; \
?SUBDIRS? fi; \
?SUBDIRS? done
+##
+## This complex find command will try to avoid changing the modes of
+## links into the source tree, in case they're hard-linked. It will
+## also make directories writable by everybody, because some
+## brain-dead tar implementations change ownership and permissions of
+## a directory before extracting the files, thus becoming unable to
+## extract them.
+##
+## Ignore return result from chmod, because it might give an error
+## if we chmod a symlink.
+##
+## Another nastiness: if the file is unreadable by us, we make it
+## readable regardless of the number of links to it. This only
+## happens in perverse cases.
+##
+## We use $(install_sh) because that is a known-portable way to modify
+## the file in place in the source tree.
+##
+?TOPDIR? -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+?TOPDIR? ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+?TOPDIR? ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+?TOPDIR? ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+?TOPDIR? || chmod -R a+r $(distdir)
+
+
+
+
+## --------------------------------------- ##
+## Building various distribution flavors. ##
+## --------------------------------------- ##
+
+## Note that we don't use GNU tar's `-z' option. One reason (but not
+## the only reason) is that some versions of tar (e.g., OSF1)
+## interpret `-z' differently.
+
+?TOPDIR?.PHONY: dist-all dist
+?TOPDIR?dist-all: dist
+?TOPDIR?dist: distdir
+?TOPDIR? $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+?TOPDIR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2
+?TOPDIR??BZIP2?.PHONY: dist-bzip2
+?TOPDIR??BZIP2?dist-bzip2: distdir
+?TOPDIR??BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+?TOPDIR??BZIP2? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??COMPRESS?.PHONY dist-all: dist-tarZ
+?TOPDIR??COMPRESS?dist-tarZ: distdir
+?TOPDIR??COMPRESS? $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+?TOPDIR??COMPRESS? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??SHAR?.PHONY dist-all: dist-shar
+?TOPDIR??SHAR?dist-shar: distdir
+?TOPDIR??SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+?TOPDIR??SHAR? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+
+?TOPDIR??ZIP?.PHONY dist-all: dist-zip
+?TOPDIR??ZIP?dist-zip: distdir
+?TOPDIR??ZIP? -rm -f $(distdir).zip
+?TOPDIR??ZIP? zip -rq $(distdir).zip $(distdir)
+?TOPDIR??ZIP? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
# Likewise for GNU make.
($MAKE --version) > /dev/null 2>&1 || exit 77
-$ACLOCAL \
- && $AUTOCONF \
- && $AUTOMAKE -a \
- && mkdir obj \
- && (cd obj && ../configure && $MAKE && ./foo && ./bar) \
- && ./configure && $MAKE && ./foo && ./bar
+set -e
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+mkdir obj
+(
+ cd obj
+ ../configure
+ $MAKE
+ /foo
+ ./bar
+)
+./configure
+$MAKE
+./foo
+./bar