From: Gary V. Vaughan Date: Fri, 1 Oct 1999 23:12:15 +0000 (+0000) Subject: * configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh X-Git-Tag: multi-language-fork~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=536476a05886f6bdd69bbbfa2ecc291a90d1082e;p=thirdparty%2Flibtool.git * configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh * Makefile.am (ltmain.sh ltconfig): removed. Automake inserts the rules to automatically call config.status. --- diff --git a/ChangeLog b/ChangeLog index 1ae2a23a7..108255392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-10-01 Gary V. Vaughan + * configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh + * Makefile.am (ltmain.sh ltconfig): removed. Automake inserts the + rules to automatically call config.status. + * libtool.m4: be sure to AC_SUBST values no longer tested in ltconfig.in. * ltconfig.in: replaced several of the simple feature tests with diff --git a/Makefile.am b/Makefile.am index 1d9fc0a14..bc1847f99 100644 --- a/Makefile.am +++ b/Makefile.am @@ -62,30 +62,6 @@ update-timestamps: echo "Cannot make dist before commit"; exit 1; else :; fi $(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh -# Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP. -# Line numbering transliterated from a section in autoconf (Autoconf 2.12). -@srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS) - date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ - rm -f $(srcdir)/ltconfig.T && \ - cd $(top_srcdir) && \ - CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=$(subdir)/$@ \ - && ./config.status && \ - $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig | \ - sed -e "s%@""TIMESTAMP@%$$date%" \ - -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \ - > $(srcdir)/ltconfig.T - chmod +x ltconfig.T - mv -f ltconfig.T $@ || \ - (rm -f $@ && cp $ltconfig.T $@ && rm -f ltconfig.T) - -@srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS) - rm -f ltmain.shT - date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ - sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ - -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT - mv -f ltmain.shT $@ || \ - (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) - # All our rules should depend on these demo files. all-recursive: $(ACINCLUDE_M4_LIST) diff --git a/configure.in b/configure.in index 1fb76486c..7344ddfa3 100644 --- a/configure.in +++ b/configure.in @@ -7,6 +7,7 @@ AM_INIT_AUTOMAKE(libtool, 1.3c) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. +TIMESTAMP= case "$VERSION" in changequote(,) *[acegikmoqsuwy]) @@ -23,6 +24,7 @@ changequote([,]) echo ;; esac +AC_SUBST(TIMESTAMP) pkgdatadir='${datadir}'"/${PACKAGE}" AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does @@ -71,9 +73,52 @@ AC_SUBST(ACINCLUDE_M4_LIST) AC_SUBST(DIST_MAKEFILE_LIST) AC_OUTPUT_COMMANDS([ - test -f ${saved_top_srcdir}/ltmain.sh || ${MAKE-make} ${saved_top_srcdir}/ltmain.sh -], [saved_top_srcdir=${srcdir}]) -AC_OUTPUT([ltconfig Makefile doc/Makefile tests/Makefile]) + if test -n "$CONFIG_FILES" && test -n "$CONFIG_HEADERS"; then + # If both these vars are non-empty, then config.status wasn't run by + # automake rules (which always set one or the other to empty). + CONFIG_OTHER=${CONFIG_OTHER-ltconfig ltmain.sh} + fi + case "$CONFIG_FILES" in + *ltconfig*) + infile=ltconfig.in + outfile=ltconfig + tmpfile=${outfile}T + + ( cd $top_srcdir + rm -f $tmpfile + ${AWK} ' + /@LINENO@/ { sub("@LINENO@", NR); } + { print; } + ' $outfile > $tmpfile + + chmod +x $tmpfile + rm -f $outfile + mv -f $tmpfile $outfile || \ + (rm -f $outfile && cp $tmpfile $outfile && rm -f $tmpfile) + ) + ;; + + *ltmain.sh*) + infile=$top_srcdir/ltmain.in + outfile=$top_srcdir/ltmain,sh + tmpfile=${outfile}T + + ( cd $top_srcdir + rm -f $tmpfile + ${AWK} ' + /@LINENO@/ { sub("@LINENO@", NR); } + { print; } + ' $outfile > $tmpfile + + rm -f $outfile + mv -f $tmpfile $outfile || \ + (rm -f $outfile && cp $tmpfile $outfile && rm -f $tmpfile) + ) + ;; + esac +], [top_srcdir=$srcdir; AWK=$AWK]) + +AC_OUTPUT([Makefile doc/Makefile tests/Makefile $srcdir/ltconfig:ltconfig.in $srcdir/ltmain.sh:ltmain.in]) # Local Variables: # mode:shell-script