From 8e75f0d46f5365cc8c1f52e82498b6f4039a303e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 5 Mar 2001 14:41:06 +0000 Subject: [PATCH] * configure.am: New file. * automake.in (&file_contents): Transform CONFIGURE-AC. (&handle_texinfo, &handle_configure): Don't transform CONFIGURE_AM. (&handle_configure): Use `configure.am'. * remake-hdr.am, remake.am, texi-vers.am: Adjust to MAINTAINER-MODE and CONFIGURE-AC. --- ChangeLog | 11 +++++++ Makefile.in | 12 ++++---- automake.in | 70 ++++++++++++++++++-------------------------- configure.am | 31 ++++++++++++++++++++ lib/am/configure.am | 31 ++++++++++++++++++++ lib/am/remake-hdr.am | 6 ++-- lib/am/texi-vers.am | 12 ++++---- m4/Makefile.in | 12 ++++---- remake-hdr.am | 6 ++-- remake.am | 4 +-- tests/Makefile.in | 12 ++++---- texi-vers.am | 12 ++++---- 12 files changed, 142 insertions(+), 77 deletions(-) create mode 100644 configure.am create mode 100644 lib/am/configure.am diff --git a/ChangeLog b/ChangeLog index dc7e2278..0b25b2c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2001-03-05 Akim Demaille + + * configure.am: New file. + * automake.in (&file_contents): Transform CONFIGURE-AC. + (&handle_texinfo, &handle_configure): Don't transform + CONFIGURE_AM. + (&handle_configure): Use `configure.am'. + * remake-hdr.am, remake.am, texi-vers.am: Adjust to + MAINTAINER-MODE and CONFIGURE-AC. + + 2001-03-05 Akim Demaille * automake.in (&pretty_print_internal): Don't output useless diff --git a/Makefile.in b/Makefile.in index a4eb3329..de6b2b18 100644 --- a/Makefile.in +++ b/Makefile.in @@ -140,13 +140,15 @@ DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: .SUFFIXES: .dvi .info .ps .texi .texinfo .txi -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$@ $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) diff --git a/automake.in b/automake.in index 8060c6d9..79bda305 100755 --- a/automake.in +++ b/automake.in @@ -2775,8 +2775,7 @@ sub handle_texinfo &transform ('TEXI' => $info_cursor, 'VTI' => $vti, 'VTEXI' => $vtexi, - 'MDDIR' => $conf_dir, - 'CONFIGURE_AC' => $configure_ac)); + 'MDDIR' => $conf_dir)); } # If user specified file_TEXINFOS, then use that as explicit @@ -3508,46 +3507,33 @@ sub handle_configure my @rewritten = &rewrite_inputs_into_dependencies (1, @secondary_inputs); - # This rule remakes the Makefile.in. Note use of - # @MAINTAINER_MODE_TRUE@ forces us to abandon pretty-printing. - # Sigh. - $output_rules .= ($infile - # NOTE perl 5.003 (with -w) gives a - # uninitialized value error on the next line. - # Don't know why. - . ': ' - . ($seen_maint_mode ? "\@MAINTAINER_MODE_TRUE\@ " : '') - . $amfile . ' ' - . '$(top_srcdir)/' . $configure_ac .' $(ACLOCAL_M4)' - . ' ' . join (' ', @include_stack) - . "\n" - . "\tcd \$(top_srcdir) && \$(AUTOMAKE) " - . ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name)) - . ($cmdline_use_dependencies ? '' : ' --ignore-deps') - . ' ' . $input . $colon_infile . "\n\n"); - - # This rule remakes the Makefile. - $output_rules .= ($local_base - # NOTE: bogus uninit value error on next line; - # see comment above. - . ': ' - . $infile . ' ' - . join (' ', @rewritten) - . ' $(top_builddir)/config.status' - . "\n" - . "\tcd \$(top_builddir) \\\n" - . "\t && CONFIG_FILES=" - . (($relative_dir eq '.') ? '$@' : '$(subdir)/$@') - . $colon_infile - . ' CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status' - . "\n\n"); + $output_rules .= + &file_contents + ('configure', + &transform ('MAKEFILE' + => $local_base, + 'MAKEFILE-DEPS' + => join (' ', @rewritten), + 'CONFIG-MAKEFILE' + => ((($relative_dir eq '.') ? '$@' : '$(subdir)/$@') + . $colon_infile), + 'MAKEFILE-IN' + => $infile, + 'MAKEFILE-IN-DEPS' + => join (' ', @include_stack), + 'MAKEFILE-AM' + => $amfile, + 'STRICTNESS' + => $cygnus_mode ? 'cygnus' : $strictness_name, + 'USE-DEPS' + => $cmdline_use_dependencies ? '' : ' --ignore-deps', + 'MAKEFILE-AM-SOURCES' + => "$input$colon_infile")); if ($relative_dir eq '.') { &handle_aclocal_m4; - $output_rules .= - &file_contents ('remake', - &transform ('CONFIGURE_AC' => $configure_ac)); + $output_rules .= &file_contents ('remake'); &examine_variable ('CONFIG_STATUS_DEPENDENCIES'); &examine_variable ('CONFIGURE_DEPENDENCIES'); @@ -3643,8 +3629,7 @@ sub handle_configure $output_rules .= &file_contents ('remake-hdr', &transform - ('CONFIGURE_AC' => $configure_ac, - 'FILES' => join (' ', @files), + ('FILES' => join (' ', @files), 'CONFIG_HEADER' => $cn_sans_dir, 'CONFIG_HEADER_IN' => $ch_sans_dir, 'CONFIG_HEADER_FULL' => $one_fullname, @@ -6791,7 +6776,7 @@ sub file_contents # prevents us from matching the end of line. "s/##([^#\n].*)?\\n//gmo;" . &transform ('CYGNUS' => $cygnus_mode, - 'MAINTAINER_MODE' => $seen_maint_mode, + 'MAINTAINER-MODE' => $seen_maint_mode, 'SHAR' => $options{'dist-shar'}, 'BZIP2' => $options{'dist-bzip2'}, @@ -6802,7 +6787,8 @@ sub file_contents 'INSTALL-MAN' => !$options{'no-installman'}, 'CK-NEWS' => $options{'check-news'}, - 'SUBDIRS' => &variable_defined ('SUBDIRS')) + 'SUBDIRS' => &variable_defined ('SUBDIRS'), + 'CONFIGURE-AC' => $configure_ac) # We don't need more than two consecutive new-lines. . 's/\n{3,}/\n\n/g'; diff --git a/configure.am b/configure.am new file mode 100644 index 00000000..571817d9 --- /dev/null +++ b/configure.am @@ -0,0 +1,31 @@ +## automake - create Makefile.in from Makefile.am +## Copyright 2001 +## Free Software Foundation, Inc. + +## 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, 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; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +## This rule remakes the Makefile.in. +?MAINTAINER-MODE?%MAKEFILE-IN%: @MAINTAINER_MODE_TRUE@ %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) +?!MAINTAINER-MODE?%MAKEFILE-IN%: %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES% + +## This rule remakes the Makefile. +?MAINTAINER-MODE?%MAKEFILE%: @MAINTAINER_MODE_TRUE@ %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status +?!MAINTAINER-MODE?%MAKEFILE%: %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=%CONFIG-MAKEFILE% $(SHELL) ./config.status diff --git a/lib/am/configure.am b/lib/am/configure.am new file mode 100644 index 00000000..571817d9 --- /dev/null +++ b/lib/am/configure.am @@ -0,0 +1,31 @@ +## automake - create Makefile.in from Makefile.am +## Copyright 2001 +## Free Software Foundation, Inc. + +## 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, 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; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +## This rule remakes the Makefile.in. +?MAINTAINER-MODE?%MAKEFILE-IN%: @MAINTAINER_MODE_TRUE@ %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) +?!MAINTAINER-MODE?%MAKEFILE-IN%: %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES% + +## This rule remakes the Makefile. +?MAINTAINER-MODE?%MAKEFILE%: @MAINTAINER_MODE_TRUE@ %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status +?!MAINTAINER-MODE?%MAKEFILE%: %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=%CONFIG-MAKEFILE% $(SHELL) ./config.status diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 7945c22d..045446e4 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -37,14 +37,14 @@ @mv %STAMP%T %STAMP% ## Explicitly look in srcdir for benefit of non-GNU makes. ## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is -?MAINTAINER_MODE?$(srcdir)/%CONFIG_HEADER_IN%: @MAINTAINER_MODE_TRUE@$(srcdir)/%SRC_STAMP%.in -?!MAINTAINER_MODE?$(srcdir)/%CONFIG_HEADER_IN%: $(srcdir)/%SRC_STAMP%.in +?MAINTAINER-MODE?$(srcdir)/%CONFIG_HEADER_IN%: @MAINTAINER_MODE_TRUE@$(srcdir)/%SRC_STAMP%.in +?!MAINTAINER-MODE?$(srcdir)/%CONFIG_HEADER_IN%: $(srcdir)/%SRC_STAMP%.in ## Recover from removal of CONFIG_HEADER_IN @if test ! -f $@; then \ rm -f $(srcdir)/%SRC_STAMP%.in; \ $(MAKE) $(srcdir)/%SRC_STAMP%.in; \ else :; fi -$(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE_AC% $(ACLOCAL_M4) %FILES% +$(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %FILES% @rm -f $(srcdir)/%SRC_STAMP%.in $(srcdir)/%SRC_STAMP%.inT ## We used to try to get a real timestamp here. But the fear is that ## that will cause unnecessary cvs conflicts diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index 67d251ff..fb0414c7 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -16,13 +16,13 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -?MAINTAINER_MODE?$(srcdir)/%VTEXI%: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-%VTI% -?!MAINTAINER_MODE?$(srcdir)/%VTEXI%: $(srcdir)/stamp-%VTI% +?MAINTAINER-MODE?$(srcdir)/%VTEXI%: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-%VTI% +?!MAINTAINER-MODE?$(srcdir)/%VTEXI%: $(srcdir)/stamp-%VTI% @: -## Depend on %CONFIGURE_AC% so that version number updates cause a +## Depend on %CONFIGURE-AC% so that version number updates cause a ## rebuild. -$(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE_AC% +$(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC% @(set `$(SHELL) %MDDIR%mdate-sh $(srcdir)/%TEXI%`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ @@ -43,7 +43,7 @@ mostlyclean-%VTI%: maintainer-clean-am: maintainer-clean-%VTI% maintainer-clean-%VTI%: -?MAINTAINER_MODE?@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% -?!MAINTAINER_MODE? -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% +?MAINTAINER-MODE?@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% +?!MAINTAINER-MODE? -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% .PHONY: mostlyclean-%VTI% maintainer-clean-%VTI% diff --git a/m4/Makefile.in b/m4/Makefile.in index f91f76e3..a5579016 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -98,13 +98,15 @@ DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnits m4/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits m4/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(m4datadir) diff --git a/remake-hdr.am b/remake-hdr.am index 7945c22d..045446e4 100644 --- a/remake-hdr.am +++ b/remake-hdr.am @@ -37,14 +37,14 @@ @mv %STAMP%T %STAMP% ## Explicitly look in srcdir for benefit of non-GNU makes. ## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is -?MAINTAINER_MODE?$(srcdir)/%CONFIG_HEADER_IN%: @MAINTAINER_MODE_TRUE@$(srcdir)/%SRC_STAMP%.in -?!MAINTAINER_MODE?$(srcdir)/%CONFIG_HEADER_IN%: $(srcdir)/%SRC_STAMP%.in +?MAINTAINER-MODE?$(srcdir)/%CONFIG_HEADER_IN%: @MAINTAINER_MODE_TRUE@$(srcdir)/%SRC_STAMP%.in +?!MAINTAINER-MODE?$(srcdir)/%CONFIG_HEADER_IN%: $(srcdir)/%SRC_STAMP%.in ## Recover from removal of CONFIG_HEADER_IN @if test ! -f $@; then \ rm -f $(srcdir)/%SRC_STAMP%.in; \ $(MAKE) $(srcdir)/%SRC_STAMP%.in; \ else :; fi -$(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE_AC% $(ACLOCAL_M4) %FILES% +$(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %FILES% @rm -f $(srcdir)/%SRC_STAMP%.in $(srcdir)/%SRC_STAMP%.inT ## We used to try to get a real timestamp here. But the fear is that ## that will cause unnecessary cvs conflicts diff --git a/remake.am b/remake.am index 0fe39ba3..2293eaff 100644 --- a/remake.am +++ b/remake.am @@ -20,6 +20,6 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck ## Explicitly look in srcdir for benefit of non-GNU makes. -?MAINTAINER_MODE?$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/%CONFIGURE_AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) -?!MAINTAINER_MODE?$(srcdir)/configure: $(srcdir)/%CONFIGURE_AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) +?MAINTAINER-MODE?$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) +?!MAINTAINER-MODE?$(srcdir)/configure: $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) diff --git a/tests/Makefile.in b/tests/Makefile.in index 827cdea6..30cc5dd1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -365,13 +365,15 @@ DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status tags: TAGS TAGS: diff --git a/texi-vers.am b/texi-vers.am index 67d251ff..fb0414c7 100644 --- a/texi-vers.am +++ b/texi-vers.am @@ -16,13 +16,13 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -?MAINTAINER_MODE?$(srcdir)/%VTEXI%: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-%VTI% -?!MAINTAINER_MODE?$(srcdir)/%VTEXI%: $(srcdir)/stamp-%VTI% +?MAINTAINER-MODE?$(srcdir)/%VTEXI%: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-%VTI% +?!MAINTAINER-MODE?$(srcdir)/%VTEXI%: $(srcdir)/stamp-%VTI% @: -## Depend on %CONFIGURE_AC% so that version number updates cause a +## Depend on %CONFIGURE-AC% so that version number updates cause a ## rebuild. -$(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE_AC% +$(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC% @(set `$(SHELL) %MDDIR%mdate-sh $(srcdir)/%TEXI%`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ @@ -43,7 +43,7 @@ mostlyclean-%VTI%: maintainer-clean-am: maintainer-clean-%VTI% maintainer-clean-%VTI%: -?MAINTAINER_MODE?@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% -?!MAINTAINER_MODE? -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% +?MAINTAINER-MODE?@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% +?!MAINTAINER-MODE? -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI% .PHONY: mostlyclean-%VTI% maintainer-clean-%VTI% -- 2.43.5