libtool/Makefile.am

134 lines
5.1 KiB
Makefile
Raw Normal View History

Refactor all the test case common code into shell functions in tests/defs, and move the various demo directories out of $top_srcdir, and into tests too. The refactoring showed up a number of inconsistencies and latent bugs, as well as fixing (I think!!) the long-standing annoyance with some of the tests giving spurious failures intermittently. While I was here, emacs kindly removed a lot of bogus whitespace and added copyright notices for us: * cdemo, demo, depdemo, f77demo, mdemo, mdemo2, pdemo, tagdemo: Moved from here... * tests/cdemo, tests/demo, tests/depdemo, tests/f77demo, tests/mdemo, tests/mdemo2, tests/pdemo, tests/tagdemo: ...to here. * tests/defs: Factor much common functionality from the test scripts into shell functions. Added a copyright notice. * tests/assign.test, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/link-2.test, tests/link.test, tests/mdemo-conf.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo-unst.test, tests/quote.test, tests/sh.test, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Refactored to use new functions in tests/defs. Added a copyright notice. * tests/hardcode.test, noinst-link.test, tests/relink.test, tests/relink.test, tests/mdryrun.test: Ditto. Moved from here... * tests/demo-hardcode.test, demo-noinst-link.test, tests/demo-relink.test, tests/depdemo-relink.test, tests/mdemo-dryrun.test: ...to here respectively. * Makefile.am: Added a copyright notice. * tests/sh.test: Check libtoolize.in for non-portabilities too. * libtoolize.in: Fix non-portabilities found by tests/sh.test.
2003-10-15 05:45:03 +08:00
## Makefile.am -- Process this file with automake to produce Makefile.in
##
A complete rewrite of the m4 code involved in the generation of libtool via config.status. The old way involved manually synchronising disparate bits of shell code in several macros, to quote a copy of a shell variable, put that in config.status, maybe add it to some quotation loops to prevent early expansion, and then add a block to _LT_CONFIG_COMMANDS to bring it into the libtool script. The new way is to mark shell variables for propogation using _LT_DECL for language independent variables, or _LT_TAGDECL for those that need to be propogated in several language flavours. The marking can be done in the macro that probes the variables, and this new m4 machinery takes care of synchronising all the other bits of code at autoconf time: * m4/ltsugar.m4: New file. Macros that are useful outside the context of libtool. Initially, contains some generalised list management macros, and the scaffolding for dictionary type data storage and retrieval. * Makefile.am (aclocal_macros): Install ltsugar.m4. * m4/libtool.m4 (_LT_DECL): Mark a shell variable for export to the libtool script, along with a comment, and hints for quoting and renaming. (_LT_TAGDECL): Similarly mark a tagged shell variable for export in each tag. (lt_decl_tag_varnames, lt_decl_quote_varnames) (lt_decl_dquote_varnames, lt_decl_varnames_tagged) (lt_decl_all_varnames): New utility macros for managing lists of shell variable names from _LT_DECL and _LT_TAGDECL. (_LT_CONFIG_STATUS_DECLARATIONS, _LT_CONFIG_STATUS_DECLARE): Expand to correctly quoted variable declarations in config.status from all marked shell variables. (_LT_LIBTOOL_DECLARE): Expand to commented and quoted variable declaration for libtool tag section. (_LT_LIBTOOL_CONFIG_VARS, _LT_LIBTOOL_TAG_VARS): Pass all marked variables to _LT_LIBTOOL_DECLARE. (_LT_CONFIG_COMMANDS): Use _LT_CONFIG_STATUS_DECLARATIONS and friends to generate all the variable passing shell code for config.status, to get marked variables from libtool.m4 into libtool itself eventually. (AC_LIBTOOL_CONFIG): Generate marked variable code for libtool tag configuration. Changed all client macros to mark variables suitably rather than the hand pasting that was necessary previously. (AC_PROG_SED): Renamed from LT_AC_PROG_SED. (LT_AC_PROG_SED): Wrap AC_PROG_SED, and mark shell variables for propogation to the libtool script.
2004-01-07 20:26:25 +08:00
## Copyright (C) 2003, 2004 Free Software Foundation
Refactor all the test case common code into shell functions in tests/defs, and move the various demo directories out of $top_srcdir, and into tests too. The refactoring showed up a number of inconsistencies and latent bugs, as well as fixing (I think!!) the long-standing annoyance with some of the tests giving spurious failures intermittently. While I was here, emacs kindly removed a lot of bogus whitespace and added copyright notices for us: * cdemo, demo, depdemo, f77demo, mdemo, mdemo2, pdemo, tagdemo: Moved from here... * tests/cdemo, tests/demo, tests/depdemo, tests/f77demo, tests/mdemo, tests/mdemo2, tests/pdemo, tests/tagdemo: ...to here. * tests/defs: Factor much common functionality from the test scripts into shell functions. Added a copyright notice. * tests/assign.test, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/link-2.test, tests/link.test, tests/mdemo-conf.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo-unst.test, tests/quote.test, tests/sh.test, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Refactored to use new functions in tests/defs. Added a copyright notice. * tests/hardcode.test, noinst-link.test, tests/relink.test, tests/relink.test, tests/mdryrun.test: Ditto. Moved from here... * tests/demo-hardcode.test, demo-noinst-link.test, tests/demo-relink.test, tests/depdemo-relink.test, tests/mdemo-dryrun.test: ...to here respectively. * Makefile.am: Added a copyright notice. * tests/sh.test: Check libtoolize.in for non-portabilities too. * libtoolize.in: Fix non-portabilities found by tests/sh.test.
2003-10-15 05:45:03 +08:00
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; see the file COPYING. If not, write to
## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.
* bootstrap: Rewritten to use autoreconf. * config.guess, config.sub, mkstamp: Moved from here... * config/config.guess, config/config.sub, config/mkstamp: ...to here, respectively. * libtool.m4, ltdl.m4: Moved from here... * m4/libtool.m4, m4/ltdl.m4: ...to here, respectively. * configure.ac: Removed various acinclude.m4 hackery, as these files are no longer needed with automake 1.8. * Makefile.am: Removed various acinclude.m4 hackery, as these files are no longer needed with automake 1.8. (AUTOMAKE_OPTIONS): Require CVS automake. (CONF_SUBDIRS, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, FFLAGS, FLIBS): Automake now makes a Make variable from every AC_SUBST, so these are NOP. (aclocal_macros): These files are now in their own m4 subdir. Changed all clients. (EXTRA_DIST): mkstamp has moved to the new config subdir. Changed all clients. (pkgdata_SCRIPTS): Ditto wrt config.guess and config.sub. (pkgdata_DATA): Ditto wrt ltmain.sh. * f77demo/configure.ac, libltdl/configure.ac (AM_CONFIG_HEADER): Is deprecated in favour of AC_CONFIG_HEADERS. Updated to the latter. * Makefile.am, cdemo/Makefile.am, demo/Makefile.am, depdemo/Makefile.am, f77demo/Makefile.am, mdemo/Makefile.am, mdemo2/Makefile.am, pdemo/Makefile.am, tagdemo/Makefile.am (EXTRA_DIST): Remove acinclude.m4. (ACLOCAL_AMFLAGS): Search new `m4' macro directory. * configure.ac, cdemo/configure.ac, demo/configure.ac, depdemo/configure.ac, f77demo/configure.ac, mdemo/configure.ac, mdemo2/configure.ac, pdemo/configure.ac, tagdemo/configure.ac (AC_CONFIG_AUX_DIR): Declare that config helper scripts are now kept in the new config subdir. * libltdl/configure.ac (AC_CONFIG_AUX_DIR): Removed. Defaults to `.' anyway.
2003-09-25 19:22:29 +08:00
ACLOCAL_AMFLAGS = -I m4
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
edit = sed \
-e 's,@PACKAGE\@,$(PACKAGE),g' \
-e 's,@VERSION\@,$(VERSION),g' \
-e 's,@MACRO_VERSION\@,$(VERSION),g' \
-e 's,@LN_S\@,$(LN_S),g' \
-e 's,@SED\@,$(SED),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@datadir\@,$(datadir),g' \
-e 's,@pkgdatadir\@,$(pkgdatadir),g' \
-e 's,@aclocaldir\@,$(aclocaldir),g' \
-e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
BUILD_SUBDIRS = . libltdl doc tests
1999-01-14 23:07:12 +08:00
SUBDIRS = $(BUILD_SUBDIRS)
DIST_SUBDIRS = $(BUILD_SUBDIRS)
1997-04-02 02:29:23 +08:00
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
EXTRA_DIST = bootstrap libtoolize.in config/ltmain.in config/mkstamp \
stamp-vcl ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 \
ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 ChangeLog.2003
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
CLEANFILES = libtool libtoolize \
libtoolize.tmp config/ltmain.tmp m4/ltversion.tmp
1997-04-02 02:29:23 +08:00
# These are required by libtoolize and must be executable when installed.
# Since _SCRIPTS gets the program transform applied we make them
# executable by hand
dist_pkgdata_DATA = config/config.guess config/config.sub config/ltmain.sh
1997-04-02 02:29:23 +08:00
# Everything that gets picked up by aclocal is automatically distributed,
# this is the list of macro files we install on the user's system.
# NOTE: Ensure that PKGMACRO_FILES in libtoolize.in is updated if you
# change the contents of aclocal_DATA:
aclocal_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
## If mkstamp does not match $(srcdir)/stamp-vcl, we still put the new one
## in the current dir, incase $(srcdir) is not writable. The dir selection
## at the top of this rule takes care of prefering the right one on
## subsequent runs.
MKSTAMP = $(SHELL) $(top_srcdir)/config/mkstamp
stamp-vcl: vcl-tmp ChangeLog
vcl-tmp:
@dir=.; test -f $$dir/stamp-vcl || dir=$(srcdir); \
set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
echo "$$1" > vcl.tmp; \
cmp -s vcl.tmp $$dir/stamp-vcl \
|| (echo "Updating stamp-vcl"; cp vcl.tmp ./stamp-vcl)
-@rm -f vcl.tmp
# We build ltversion.m4 here, instead of from config.status,
# because config.status is rerun each time one of configure's
# dependencies change and ltversion.m4 happens to be a configure
# dependency. configure and ltversion.m4 would be rebuilt in
# a loop otherwise.
# Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
# how ltversion.m4 appears in our dependencies.
EXTRA_DIST += m4/ltversion.in
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
$(top_srcdir)/m4/ltversion.m4: m4/ltversion.in configure.ac stamp-vcl
cd $(top_srcdir); \
rm -f m4/ltversion.tmp; \
set -- `$(MKSTAMP) < ChangeLog`; \
serial=`echo $$1 | sed 's,^1[.],,g'`; \
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
input="ltversion.in"; \
$(edit) -e "s,@MACRO_REVISION\@,$$1,g" \
-e "s,@MACRO_SERIAL\@,$$serial,g" \
m4/ltversion.in > m4/ltversion.tmp; \
chmod a-w m4/ltversion.tmp; \
mv -f m4/ltversion.tmp $(top_srcdir)/m4/ltversion.m4
1997-04-02 02:29:23 +08:00
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
## And for similar reasons, ltmain.sh can't be built from config.status.
EXTRA_DIST += config/ltmain.sh
$(top_srcdir)/config/ltmain.sh: config/ltmain.in configure.ac stamp-vcl
cd $(top_srcdir); \
rm -f config/ltmain.tmp; \
set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
input="ltmain.in"; \
$(edit) -e "s,@TIMESTAMP\@,$$1 $$2 $$3,g" \
-e "s,@package_revision\@,$$1,g" \
config/ltmain.in > config/ltmain.tmp; \
chmod a-w config/ltmain.tmp; \
mv -f config/ltmain.tmp $(top_srcdir)/config/ltmain.sh
1997-04-02 02:29:23 +08:00
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
# The libtool distributor and the standalone libtool script.
bin_SCRIPTS = libtoolize libtool
libtoolize: libtoolize.in Makefile
rm -f libtoolize.tmp libtoolize
input="libtoolize.in"; \
$(edit) $(srcdir)/libtoolize.in > libtoolize.tmp
chmod a+x libtoolize.tmp
chmod a-w libtoolize.tmp
mv -f libtoolize.tmp libtoolize
# Automake doesn't want us to generate distributed files from config.status,
# but the alternative (see libtool-1.4.3) was even uglier!
libtool: $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@
.PHONY: configure-subdirs
configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
@DIST_MAKEFILE_LIST@:
dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
test -d $$dir || mkdir $$dir || exit 1; \
abs_srcdir=`cd $(top_srcdir) && pwd`; \
1999-01-15 17:21:04 +08:00
(cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
install-data-local:
## Don't install over the top of an old pkgdatadir
-rm -rf $(DESTDIR)$(pkgdatadir)
install-data-hook:
chmod +x $(DESTDIR)$(pkgdatadir)/config.guess
chmod +x $(DESTDIR)$(pkgdatadir)/config.sub