* configure.am: New file.
authorAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:41:08 +0000 (14:41 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:41:08 +0000 (14:41 +0000)
* 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.

12 files changed:
ChangeLog
Makefile.in
automake.in
configure.am [new file with mode: 0644]
lib/am/configure.am [new file with mode: 0644]
lib/am/remake-hdr.am
lib/am/texi-vers.am
m4/Makefile.in
remake-hdr.am
remake.am
tests/Makefile.in
texi-vers.am

index dc7e227..0b25b2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
+       * 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  <akim@epita.fr>
+
        * automake.in (&pretty_print_internal): Don't output useless
        spaces.
        (define_pretty_variable): Don't issue the space after the `=' sign
index a4eb332..de6b2b1 100644 (file)
@@ -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)
 
index 8060c6d..79bda30 100755 (executable)
@@ -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 (file)
index 0000000..571817d
--- /dev/null
@@ -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 (file)
index 0000000..571817d
--- /dev/null
@@ -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
index 7945c22..045446e 100644 (file)
        @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
index 67d251f..fb0414c 100644 (file)
 ## 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%
index f91f76e..a557901 100644 (file)
@@ -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)
index 7945c22..045446e 100644 (file)
        @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
index 0fe39ba..2293eaf 100644 (file)
--- 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)
index 827cdea..30cc5dd 100644 (file)
@@ -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:
 
index 67d251f..fb0414c 100644 (file)
 ## 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%