summaryrefslogtreecommitdiff
path: root/lib/am
diff options
context:
space:
mode:
Diffstat (limited to 'lib/am')
-rw-r--r--lib/am/depend2.am72
-rw-r--r--lib/am/distdir.am20
-rw-r--r--lib/am/texibuild.am42
-rw-r--r--lib/am/texinfos.am53
4 files changed, 46 insertions, 141 deletions
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 45dd88c5e..90dcd2a68 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -32,59 +32,40 @@
## a package with gcc 3.x or later. In this case we can skip the use of
## depcomp and easily inline the dependency tracking.
+if %?FIRST%
+## TODO: rewrite this to avoid extra forks once we can assume a POSIX shell.
+am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'`
+endif %?FIRST%
+
if %?NONLIBTOOL%
?GENERIC?%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+ %VERBOSE%$(am__set_depbase) && \
+ %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE%; \
+ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+ else rm -f $$depbase.Tpo; false; fi
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-if %?GENERIC%
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%%SOURCE%
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%%SOURCE%
-else !%?GENERIC%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-endif !%?GENERIC%
+ %VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
?GENERIC?%EXT%.obj:
?!GENERIC?%OBJOBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+ %VERBOSE%$(am__set_depbase) && \
+ %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%); \
+ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+ else rm -f $$depbase.Tpo; false; fi
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-if %?GENERIC%
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% `$(CYGPATH_W) %SOURCEFLAG%'%SOURCE%'`
-else !%?GENERIC%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-endif !%?GENERIC%
+ %VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%)
endif !%FASTDEP%
endif %?NONLIBTOOL%
@@ -92,23 +73,14 @@ if %?LIBTOOL%
?GENERIC?%EXT%.lo:
?!GENERIC?%LTOBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??!SUBDIROBJ? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-?GENERIC??SUBDIROBJ? %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+ %VERBOSE%$(am__set_depbase) && \
+ %LTCOMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE% && \
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=yes @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-## We can always use '-o' with Libtool.
-?GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+ %VERBOSE-NODEP%%LTCOMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
endif %?LIBTOOL%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 653966f0e..859c6d530 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -347,24 +347,6 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
-?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
-.PHONY: dist-tarZ
-dist-tarZ: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__post_remove_distdir)
-
-?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
-.PHONY: dist-shar
-dist-shar: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
- $(am__post_remove_distdir)
-
?ZIP?DIST_ARCHIVES += $(distdir).zip
.PHONY: dist-zip
dist-zip: distdir
@@ -374,11 +356,9 @@ dist-zip: distdir
?LZIP?DIST_TARGETS += dist-lzip
?XZ?DIST_TARGETS += dist-xz
-?SHAR?DIST_TARGETS += dist-shar
?BZIP2?DIST_TARGETS += dist-bzip2
?GZIP?DIST_TARGETS += dist-gzip
?ZIP?DIST_TARGETS += dist-zip
-?COMPRESS?DIST_TARGETS += dist-tarZ
endif %?TOPDIR_P%
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index e2d1b669f..0a6d7b527 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -22,40 +22,14 @@
## should never be dependent upon a non-distributed built file.
## Therefore we ensure that %DIRSTAMP% exists in the rule.
?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
-## Back up the info files before running makeinfo. This is the cheapest
-## way to ensure that
-## 1) If the texinfo file shrinks (or if you start using --no-split),
-## you'll not be left with some dead info files lying around -- dead
-## files which would end up in the distribution.
-## 2) If the texinfo file has some minor mistakes which cause makeinfo
-## to fail, the info files are not removed. (They are needed by the
-## developer while he writes documentation.)
-## *.iNN files are used on DJGPP. See the comments in install-info-am
- %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
- rm -rf $$backupdir && mkdir $$backupdir && \
-## If makeinfo is not installed we must not backup the files so
-## 'missing' can do its job and touch $@ if it exists.
- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
- done; \
- else :; fi && \
-?INSRC? cd "$$am__cwd"; \
- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
-?!INSRC? -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%; \
-?INSRC??!GENERIC_INFO? -o $@ $(srcdir)/%SOURCE_INFO%; \
-?INSRC??GENERIC_INFO? -o $@ $<; \
- then \
- rc=0; \
-?INSRC? $(am__cd) $(srcdir); \
- else \
- rc=$$?; \
-## Beware that backup info files might come from a subdirectory.
-?INSRC? $(am__cd) $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
+## If the texinfo file has some minor mistakes which cause makeinfo
+## to fail, the info files are not removed.
+ $(AM_V_MAKEINFO)$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+ %MAKEINFOFLAGS% --no-split -o $@-t \
+?!INSRC? `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%
+?INSRC??!GENERIC_INFO? $(srcdir)/%SOURCE_INFO%
+?INSRC??GENERIC_INFO? $<
+ $(AM_V_at)mv -f $@-t $@
INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index a2a21e667..a72ec1596 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -191,23 +191,11 @@ install-info-am: $(INFO_DEPS)
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
-## 8+3 filesystems cannot deal with foo.info-N filenames: they all
-## conflict. DJGPP comes with a tool, DJTAR, that will rename these
-## files to foo.iNN while extracting the archive. DJGPP's makeinfo
-## is patched to grok these filenames. However we have to account
-## for the renaming when installing the info files.
-##
-## If $file == foo.info, then $file_i == foo.i. The reason we use two
-## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
-## 'foo' becomes 'foo.i' too.
- file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
- for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
- $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
- if test -f $$ifile; then \
- echo "$$ifile"; \
- else : ; fi; \
- done; \
+ if test -f $$file; then \
+ echo ./$$file; \
+ else \
+ echo $(srcdir)/$$file; \
+ fi; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
@@ -321,11 +309,9 @@ uninstall-info-am:
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
-## DJGPP-style info files. See comment in install-info-am.
- relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
- echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
- rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile"; \
+ rm -f $$relfile; \
else :; fi); \
done
@@ -358,16 +344,14 @@ dist-info: $(INFO_DEPS)
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
- for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
- if test -f $$file; then \
-## Strip leading '$$d/'.
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f "$(distdir)/$$relfile" || \
- cp -p $$file "$(distdir)/$$relfile"; \
- else :; fi; \
- done; \
+ if test -f $$base; then \
+ file=./$$base; \
+ else \
+ file=$(srcdir)/$$base; \
+ fi; \
+ if test -f $$file && test ! -f "$(distdir)/$$base"; then \
+ cp -p $$file "$(distdir)/$$base"; \
+ fi; \
done
endif %?LOCAL-TEXIS%
@@ -397,12 +381,7 @@ clean-aminfo:
.PHONY maintainer-clean-am: maintainer-clean-aminfo
maintainer-clean-aminfo:
- @list='$(INFO_DEPS)'; for i in $$list; do \
-## .iNN files are DJGPP-style info files.
- i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
+ -test -z "$(INFO_DEPS)" || rm -f $(INFO_DEPS)
## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
## above for details.
?MAINTCLEAN? -test -z "%MAINTCLEAN%" \