From 746226fe4e3e47763d61d425e95e609bf066e42b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 9 Apr 2001 09:47:17 +0000 Subject: [PATCH] * distdir.am: Use and abuse of if/endif. * scripts.am: Using if/endif with variables is fine. --- ChangeLog | 5 ++ Makefile.in | 3 +- distdir.am | 183 ++++++++++++++++++++++++++-------------------- lib/am/distdir.am | 183 ++++++++++++++++++++++++++-------------------- lib/am/scripts.am | 2 +- scripts.am | 2 +- 6 files changed, 215 insertions(+), 163 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2677c49..73746e5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-09 Akim Demaille + + * distdir.am: Use and abuse of if/endif. + * scripts.am: Using if/endif with variables is fine. + 2001-04-09 Akim Demaille * automake.in (&make_paragraphs): Extract from &file_contents. diff --git a/Makefile.in b/Makefile.in index e41243c8..b29004ae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -405,7 +405,8 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) GZIP_ENV = --best 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 diff --git a/distdir.am b/distdir.am index 20b36f12..5c3b137f 100644 --- a/distdir.am +++ b/distdir.am @@ -29,10 +29,15 @@ distdir: $(DISTFILES) ## 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? echo "NEWS not updated; not releasing" 1>&2; \ -?TOPDIR??CK-NEWS? exit 1; \ -?TOPDIR??CK-NEWS? fi +if %?TOPDIR% +if %?CK-NEWS% + @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; + then :; else \ + echo "NEWS not updated; not releasing" 1>&2; \ + exit 1; \ + fi +endif %?CK-NEWS% +endif %?TOPDIR% ## ## Only for the top dir. ## @@ -76,27 +81,31 @@ distdir: $(DISTFILES) ## directory, then we use `distdir' instead of `top_distdir'; this lets ## us work correctly with an enclosing package. ## -?SUBDIRS? for subdir in $(%DIST_SUBDIR_NAME%); do \ -?SUBDIRS? if test "$$subdir" = .; then :; else \ -?SUBDIRS? test -d $(distdir)/$$subdir \ -?SUBDIRS? || mkdir $(distdir)/$$subdir \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? (cd $$subdir && \ -?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ -?SUBDIRS? top_distdir="$(top_distdir)" \ -?SUBDIRS? distdir=../$(distdir)/$$subdir \ -?SUBDIRS? distdir) \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? fi; \ -?SUBDIRS? done +if %?SUBDIRS% + for subdir in $(%DIST_SUBDIR_NAME%); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done +endif %?SUBDIRS% ## ## We might have to perform some last second updates, such as updating ## info files. ## We must explicitly set distdir and top_distdir for these sub-makes. ## -?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ -?DIST-TARGETS? top_distdir="${top_distdir}" distdir="$(distdir)" \ -?DIST-TARGETS? %DIST-TARGETS% +if %?DIST-TARGETS% + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="${top_distdir}" distdir="$(distdir)" \ + %DIST-TARGETS% +endif %?DIST-TARGETS% ## ## 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 @@ -115,11 +124,13 @@ distdir: $(DISTFILES) ## 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) +if %?TOPDIR% + -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) +endif %?TOPDIR% @@ -132,38 +143,48 @@ distdir: $(DISTFILES) ## the only reason) is that some versions of tar (e.g., OSF1) ## interpret `-z' differently. -?TOPDIR?GZIP_ENV = --best -?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) +if %?TOPDIR% +GZIP_ENV = --best +.PHONY: dist-all dist +dist-all: dist +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) -?TOPDIR??BZIP2?.PHONY dist-all: 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) +if %?BZIP2% +.PHONY dist-all: dist-bzip2 +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?BZIP2% -?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) +if %?COMPRESS% +.PHONY dist-all: dist-tarZ +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?COMPRESS% -?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) +if %?SHAR% +.PHONY dist-all: dist-shar +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?SHAR% -?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) +if %?ZIP% +.PHONY dist-all: dist-zip +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?ZIP% +endif %?TOPDIR% ## ------------------------- ## @@ -171,43 +192,45 @@ distdir: $(DISTFILES) ## ------------------------- ## -?TOPDIR?# This target untars the dist file and tries a VPATH configuration. Then -?TOPDIR?# it guarantees that the distribution is self-contained by making another -?TOPDIR?# tarfile. -?TOPDIR?.PHONY: distcheck -?TOPDIR?distcheck: dist +if %?TOPDIR% +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +.PHONY: distcheck +distcheck: dist ## Make sure we can remove distdir before trying to remove it. -?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) -?TOPDIR? GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ## Make the new source tree read-only. Distributions ought to work in ## this case. However, make the top-level directory writable so we ## can make our new subdirs. -?TOPDIR? chmod -R a-w $(distdir); chmod a+w $(distdir) -?TOPDIR? mkdir $(distdir)/=build -?TOPDIR? mkdir $(distdir)/=inst + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/=build + mkdir $(distdir)/=inst ## Undo the write access. -?TOPDIR? chmod a-w $(distdir) -?TOPDIR? dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ -?TOPDIR??DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ -?TOPDIR? && cd $(distdir)/=build \ -?TOPDIR? && ../configure --srcdir=.. --prefix=$$dc_install_base \ -?TOPDIR??GETTEXT? --with-included-gettext \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) dvi \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) check \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) install \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) installcheck \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + chmod a-w $(distdir) + dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ +?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ + && cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ +?GETTEXT? --with-included-gettext \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ## We use -le 1 because the `dir' file might still exist after uninstall. -?TOPDIR? && test `find $$dc_install_base -type f -print | wc -l` -le 1 \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) dist \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) distclean \ + && test `find $$dc_install_base -type f -print | wc -l` -le 1 \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && $(MAKE) $(AM_MAKEFLAGS) distclean \ ## Make sure to remove the dist file we created in the test build ## directory. -?TOPDIR? && rm -f $(distdir).tar.gz \ -?TOPDIR? && (test `find . -type f -print | wc -l` -eq 0 \ -?TOPDIR? || (echo "Error: files left after distclean" 1>&2; \ -?TOPDIR? exit 1) ) -?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) -?TOPDIR? @echo "$(distdir).tar.gz is ready for distribution" | \ -?TOPDIR? sed 'h;s/./=/g;p;x;p;x' + && rm -f $(distdir).tar.gz \ + && (test `find . -type f -print | wc -l` -eq 0 \ + || (echo "Error: files left after distclean" 1>&2; \ + exit 1) ) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;p;x' +endif %?TOPDIR% diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 20b36f12..5c3b137f 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -29,10 +29,15 @@ distdir: $(DISTFILES) ## 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? echo "NEWS not updated; not releasing" 1>&2; \ -?TOPDIR??CK-NEWS? exit 1; \ -?TOPDIR??CK-NEWS? fi +if %?TOPDIR% +if %?CK-NEWS% + @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; + then :; else \ + echo "NEWS not updated; not releasing" 1>&2; \ + exit 1; \ + fi +endif %?CK-NEWS% +endif %?TOPDIR% ## ## Only for the top dir. ## @@ -76,27 +81,31 @@ distdir: $(DISTFILES) ## directory, then we use `distdir' instead of `top_distdir'; this lets ## us work correctly with an enclosing package. ## -?SUBDIRS? for subdir in $(%DIST_SUBDIR_NAME%); do \ -?SUBDIRS? if test "$$subdir" = .; then :; else \ -?SUBDIRS? test -d $(distdir)/$$subdir \ -?SUBDIRS? || mkdir $(distdir)/$$subdir \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? (cd $$subdir && \ -?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ -?SUBDIRS? top_distdir="$(top_distdir)" \ -?SUBDIRS? distdir=../$(distdir)/$$subdir \ -?SUBDIRS? distdir) \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? fi; \ -?SUBDIRS? done +if %?SUBDIRS% + for subdir in $(%DIST_SUBDIR_NAME%); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done +endif %?SUBDIRS% ## ## We might have to perform some last second updates, such as updating ## info files. ## We must explicitly set distdir and top_distdir for these sub-makes. ## -?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ -?DIST-TARGETS? top_distdir="${top_distdir}" distdir="$(distdir)" \ -?DIST-TARGETS? %DIST-TARGETS% +if %?DIST-TARGETS% + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="${top_distdir}" distdir="$(distdir)" \ + %DIST-TARGETS% +endif %?DIST-TARGETS% ## ## 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 @@ -115,11 +124,13 @@ distdir: $(DISTFILES) ## 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) +if %?TOPDIR% + -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) +endif %?TOPDIR% @@ -132,38 +143,48 @@ distdir: $(DISTFILES) ## the only reason) is that some versions of tar (e.g., OSF1) ## interpret `-z' differently. -?TOPDIR?GZIP_ENV = --best -?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) +if %?TOPDIR% +GZIP_ENV = --best +.PHONY: dist-all dist +dist-all: dist +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) -?TOPDIR??BZIP2?.PHONY dist-all: 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) +if %?BZIP2% +.PHONY dist-all: dist-bzip2 +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?BZIP2% -?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) +if %?COMPRESS% +.PHONY dist-all: dist-tarZ +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?COMPRESS% -?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) +if %?SHAR% +.PHONY dist-all: dist-shar +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?SHAR% -?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) +if %?ZIP% +.PHONY dist-all: dist-zip +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +endif %?ZIP% +endif %?TOPDIR% ## ------------------------- ## @@ -171,43 +192,45 @@ distdir: $(DISTFILES) ## ------------------------- ## -?TOPDIR?# This target untars the dist file and tries a VPATH configuration. Then -?TOPDIR?# it guarantees that the distribution is self-contained by making another -?TOPDIR?# tarfile. -?TOPDIR?.PHONY: distcheck -?TOPDIR?distcheck: dist +if %?TOPDIR% +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +.PHONY: distcheck +distcheck: dist ## Make sure we can remove distdir before trying to remove it. -?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) -?TOPDIR? GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ## Make the new source tree read-only. Distributions ought to work in ## this case. However, make the top-level directory writable so we ## can make our new subdirs. -?TOPDIR? chmod -R a-w $(distdir); chmod a+w $(distdir) -?TOPDIR? mkdir $(distdir)/=build -?TOPDIR? mkdir $(distdir)/=inst + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/=build + mkdir $(distdir)/=inst ## Undo the write access. -?TOPDIR? chmod a-w $(distdir) -?TOPDIR? dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ -?TOPDIR??DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ -?TOPDIR? && cd $(distdir)/=build \ -?TOPDIR? && ../configure --srcdir=.. --prefix=$$dc_install_base \ -?TOPDIR??GETTEXT? --with-included-gettext \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) dvi \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) check \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) install \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) installcheck \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + chmod a-w $(distdir) + dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ +?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ + && cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ +?GETTEXT? --with-included-gettext \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ## We use -le 1 because the `dir' file might still exist after uninstall. -?TOPDIR? && test `find $$dc_install_base -type f -print | wc -l` -le 1 \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) dist \ -?TOPDIR? && $(MAKE) $(AM_MAKEFLAGS) distclean \ + && test `find $$dc_install_base -type f -print | wc -l` -le 1 \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && $(MAKE) $(AM_MAKEFLAGS) distclean \ ## Make sure to remove the dist file we created in the test build ## directory. -?TOPDIR? && rm -f $(distdir).tar.gz \ -?TOPDIR? && (test `find . -type f -print | wc -l` -eq 0 \ -?TOPDIR? || (echo "Error: files left after distclean" 1>&2; \ -?TOPDIR? exit 1) ) -?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) -?TOPDIR? @echo "$(distdir).tar.gz is ready for distribution" | \ -?TOPDIR? sed 'h;s/./=/g;p;x;p;x' + && rm -f $(distdir).tar.gz \ + && (test `find . -type f -print | wc -l` -eq 0 \ + || (echo "Error: files left after distclean" 1>&2; \ + exit 1) ) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;p;x' +endif %?TOPDIR% diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 52b5414a..96b068dd 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -23,7 +23,7 @@ if %?INSTALL% ## if doesn't work properly for Automake variables yet. -?INSTALL?_am_installdirs += $(DESTDIR)$(%NDIR%dir) +_am_installdirs += $(DESTDIR)$(%NDIR%dir) ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS) diff --git a/scripts.am b/scripts.am index 52b5414a..96b068dd 100644 --- a/scripts.am +++ b/scripts.am @@ -23,7 +23,7 @@ if %?INSTALL% ## if doesn't work properly for Automake variables yet. -?INSTALL?_am_installdirs += $(DESTDIR)$(%NDIR%dir) +_am_installdirs += $(DESTDIR)$(%NDIR%dir) ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS) -- 2.43.5