]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Bug fixes. Handle AC_PATH_XTRA. Handle AC_OUTPUT : syntax
authorTom Tromey <tromey@redhat.com>
Fri, 9 Feb 1996 05:02:29 +0000 (05:02 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 9 Feb 1996 05:02:29 +0000 (05:02 +0000)
12 files changed:
ChangeLog
NEWS
TODO
automake.in
data.am
header.am
lib/am/data.am
lib/am/header.am
lib/am/scripts.am
libraries.am
programs.am
scripts.am

index 5c842b81014f11bf76aafaccfe9c2669a8556ea9..63e9736b72ad689e88e6e4cd34bba691355153d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,23 @@
 Thu Feb  8 15:30:29 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * automake.in (handle_configure): Handle AC_OUTPUT ":" syntax.
+
+       From Jim Meyering:
+       * libraries.am (install-@DIR@LIBRARIES): Depend on all, not
+       (@DIR@_LIBFILES).
+       * header.am (install-@DIR@HEADERS): Depend on all, not
+       $(@DIR@_HEADERS).
+       * data.am (install-@DIR@DATA): Depend on all, not $(@DIR@_DATA).
+       * scripts.am (install-@DIR@SCRIPTS): Depend on all, not
+       $(@DIR@_SCRIPTS).
+       * programs.am (install-@DIR@PROGRAMS): Depend on all, not
+       $(@DIR@_PROGRAMS).
+
        * automake.in (initialize_per_input): Initialize
        $use_dependencies.
+       ($seen_path_xtra): New variable.
+       (scan_configure): Look for AC_PATH_XTRA.
+       (get_object_extension): Add variables to output if X seen.
 
 Thu Feb  8 10:02:45 1996  Greg A. Woods  <woods@most.weird.com>
 
diff --git a/NEWS b/NEWS
index 4e9ad342e51a0192050f6971c87a94e1a79077ef..578a8876ed9e9878adf3e0b5b8953eb5440ef5c9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+New in 0.30:
+* configure.in scanner knows about AC_PATH_XTRA
+* 
+\f
 New in 0.29:
 * Many bug fixes
 * More sophisticated configure.in scanning; now understands ALLOCA and
diff --git a/TODO b/TODO
index c765d8c3433f6d4430c3e009fc19dfd763663f2d..f97b47652645d1c5b8621502e29201b961bbd40b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,15 +4,11 @@ Top priorities:
   This will allow the callers to be a little smarter.
 * Rewrite clean targets.
 
-Make HEADERS obsolete
-
 Think about ways to make automake fit better with Cygnus-style trees.
 
 Handle MAINT_CHARSET.  Use recode in dist target.  Handle dist-zoo and
 dist-zip.
 
-If AC_PATH_X given, add extra stuff to generated Makefile.in.
-
 Add support for html via an option.  Use texi2html.  Use
 "html_TEXINFOS", and htmldir = .../html.  Include html files in
 distribution.  Also allow "html_DATA", for raw .html files.
@@ -26,6 +22,7 @@ a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
 these files can't be de-ansified.  Not a problem?
 
 consider automatically adding -I$(srcdir) to INCLUDES.
+ditto path to config.h
 
 In general most .am files should be merged into automake.  For
 instance all the "clean" targets could be merged by keeping lists of
@@ -57,10 +54,6 @@ Consider supporting syntax from autoconf "derived:source", eg:
 Write autoconf macro to do all work necessary for automake.  Eg define
 PACKAGE, VERSION, etc.
 
-Change glob pattern to look for to '*/Makefile*.am', so that gettext's
-po directory can use a Makefile.in.am (and generate Makefile.in.in)
-
-Should 'distclean' remove $(SCRIPTS)?
 'maintainer-clean' should "rm -rf .deps".  Ditto distclean
 Should look for clean-local targets in Makefile.am.
 
index 2d6c5035629f7319273fbf0dd09ee907d2caab7c..d682a887a4ab4251512d309bcd6001aa91626578 100755 (executable)
@@ -103,6 +103,9 @@ $seen_prog_install = 0;
 # 1 if any scripts installed, 0 otherwise.
 $scripts_installed = 0;
 
+# Whether AC_PATH_XTRA has been seen in configure.in
+$seen_path_xtra = 0;
+
 \f
 
 &initialize_global_constants;
@@ -119,6 +122,7 @@ die "automake: no \`Makefile.am' found or specified\n"
 # Now do all the work on each file.
 foreach $am_file (@input_files)
 {
+    # FIXME should support the AC_OUTPUT ":" syntax here.
     if (! -f ($am_file . '.am'))
     {
        &am_error ('no such file');
@@ -341,12 +345,22 @@ sub get_object_extension
 {
     if (! $dir_holds_sources)
     {
-
        # Boilerplate.
        $output_vars .= &file_contents ('compile-vars');
        $output_rules .= &file_contents ('compile');
        &push_phony_cleaners ('compile');
 
+       # If using X, include some extra variable definitions.  NOTE
+       # we don't want to force these into CFLAGS or anything,
+       # because not all programs will necessarily use X.
+       if ($seen_path_xtra)
+       {
+           $output_vars .= ("X_CFLAGS = \@X_CFLAGS\@\n"
+                            . "X_LIBS = \@X_LIBS\@\n"
+                            . "X_EXTRA_LIBS = \@X_EXTRA_LIBS\@\n"
+                            . "X_PRE_LIBS = \@X_PRE_LIBS\@\n");
+       }
+
        # Check for automatic de-ANSI-fication.
        $dir_holds_sources = '.o';
        push (@suffixes, '.c', '.o');
@@ -1144,7 +1158,7 @@ sub handle_configure
 
     # Now look for other files in this directory which must be remade
     # by config.status, and generate rules for them.
-    local ($file, $local);
+    local ($file, $local, $input);
     foreach $file (@other_input_files)
     {
        # Skip files not in this directory, any Makefile, and the
@@ -1154,9 +1168,21 @@ sub handle_configure
        ($local = $file) =~ s/^.*\///;
        next if $local eq 'Makefile';
 
-       # FIXME support ":" syntax of AC_OUTPUT here.
+       if ($local =~ /^(.*):(.*)$/)
+       {
+           # This is the ":" syntax of AC_OUTPUT.
+           $input = $2;
+           $local = $1;
+       }
+       else
+       {
+           # Normal usage.
+           $input = $local . '.in';
+       }
+       # FIXME when using autoconf ":" syntax, should we set CONFIG_FILES
+       # to $local:$input?
        $output_rules .= ($local . ': '
-                         . '$(top_builddir)/config.status ' . $local . ".in\n"
+                         . '$(top_builddir)/config.status ' . $input . "\n"
                          . "\t"
                          . 'cd $(top_srcdir) && CONFIG_FILES='
                          . ($relative_dir eq '.' ? '' : '$(subdir)/')
@@ -1533,6 +1559,7 @@ sub scan_configure
        }
 
        $seen_canonical = 1 if /AC_CANONICAL_(HOST|SYSTEM)/;
+       $seen_path_xtra = 1 if /AC_PATH_XTRA/;
 
        # Some things required by Automake.  FIXME we only really
        # require fp_PROG_INSTALL if some scripts are installed.  And
diff --git a/data.am b/data.am
index aa445f9efdd28e86e8d12031653d700ac2fdc7e6..f8bbab26632100a55e75fd9d983967a6b66cbbad 100644 (file)
--- a/data.am
+++ b/data.am
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-install-@DIR@DATA: $(@DIR@_DATA)
+##
+## Can't depend on $(@DIR@_DATA) here; otherwise conditional
+## data will always be built.
+install-@DIR@DATA: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_DATA); do              \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index bc257504889d3e1f4f7b44bff569ed08c78217b9..4c0409edc92b5527137cdc40041236308c9dea53 100644 (file)
--- a/header.am
+++ b/header.am
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-install-@DIR@HEADERS: $(@DIR@_HEADERS)
+##
+## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
+## headers will always be built.
+install-@DIR@HEADERS: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_HEADERS); do           \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index aa445f9efdd28e86e8d12031653d700ac2fdc7e6..f8bbab26632100a55e75fd9d983967a6b66cbbad 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.
-install-@DIR@DATA: $(@DIR@_DATA)
+##
+## Can't depend on $(@DIR@_DATA) here; otherwise conditional
+## data will always be built.
+install-@DIR@DATA: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_DATA); do              \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index bc257504889d3e1f4f7b44bff569ed08c78217b9..4c0409edc92b5527137cdc40041236308c9dea53 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.
-install-@DIR@HEADERS: $(@DIR@_HEADERS)
+##
+## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
+## headers will always be built.
+install-@DIR@HEADERS: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_HEADERS); do           \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index 39199d7194e92155179cfc66a4c8cf566f824af0..f542206aa8cfb0c39c4e471577d2b0398727abf8 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.
-install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
+##
+## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
+## scripts will always be built.
+install-@DIR@SCRIPTS: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_SCRIPTS); do           \
          if test -f $$p; then                  \
index ab4c9c19e374a09ee31f15a9b122c5b4478e1c56..4762266393b3bc26224d1980220334476b212f2b 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.
-install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
+##
+## Can't depend on $(@DIR@_LIBRARIES) here; otherwise conditional
+## libraries will always be built.
+install-@DIR@LIBRARIES: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_LIBFILES); do          \
          if test -f $$p; then                  \
index 26379ca770b75aeb0b5c6209c34ac7ef001d8c82..440df599faad20fb69eda6956986007e378d9215 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.
-install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
+##
+## Can't depend on $(@DIR@_PROGRAMS) here; otherwise conditional
+## executables will always be built.
+install-@DIR@PROGRAMS: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_PROGRAMS); do          \
          if test -f $$p; then                  \
index 39199d7194e92155179cfc66a4c8cf566f824af0..f542206aa8cfb0c39c4e471577d2b0398727abf8 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.
-install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
+##
+## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
+## scripts will always be built.
+install-@DIR@SCRIPTS: all
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_SCRIPTS); do           \
          if test -f $$p; then                  \