* automake.texi: Document LIBOBJS trick.
authorTom Tromey <tromey@redhat.com>
Sun, 27 Sep 1998 22:33:01 +0000 (22:33 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 27 Sep 1998 22:33:01 +0000 (22:33 +0000)
ChangeLog
TODO
automake.in
automake.texi

index 1b5d16b..acc55dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 Sun Sep 27 20:02:21 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.texi: Document LIBOBJS trick.
+
        * automake.in (handle_dist_worker): If DIST_SUBDIRS defined, use
        it even when SUBDIRS not conditional.
 
diff --git a/TODO b/TODO
index 5efc865..83ba35e 100644 (file)
--- a/TODO
+++ b/TODO
 * Allow per-object cflags:
        bin_PROGRAMS = foo
        foo_CFLAGS = -DFOO
+* At the same time, allow sources in subdirs:
+       foo_SOURCES = x/y.c
+  This requires `mkdir x' at build time
+ [ both of these require per-file rules, and not pattern rules ]
+ [ use user-written suffix rules to generate the per-file rules in
+   an automatic way -- this would be mucho cool ]
 
 * Allow for multiple translations of a texinfo file:
        LL_info_TEXINFOS = ...
index b865e1a..5858450 100755 (executable)
@@ -1018,7 +1018,7 @@ sub handle_yacc_lex_cxx
 
     # Push all libobjs files onto de_ansi_files.  We actually only
     # push files which exist in the current directory, and which are
-    # genuine source files.  This is moderately lame.  FIXME.
+    # genuine source files.
     local ($file);
     foreach $file (keys %libsources)
     {
index f4e8a5d..cf8b6f1 100644 (file)
@@ -1729,6 +1729,20 @@ AUTOMAKE_OPTIONS = ../lib/ansi2knr
 If no directory prefix is given, the files are assumed to be in the
 current directory.
 
+Files mentioned in @code{LIBOBJS} which need de-ANSI-fication will not
+be automatically handled.  That's because @code{configure} will generate
+an object name like @file{regex.o}, while @code{make} will be looking
+for @file{regex_.o} (when de-ANSI-fying).  Eventually this problem will
+be fixed via @code{autoconf} magic, but for now you must put this code
+into your @file{configure.in}, just before the @code{AC_OUTPUT} call:
+
+@example
+# This is necessary so that .o files in LIBOBJS are also built via
+# the ANSI2KNR-filtering rules.
+LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
+@end example
+
+
 @node Dependencies,  , ANSI, Programs
 @section Automatic dependency tracking
 
@@ -2199,7 +2213,7 @@ files in subdirectories for which a new @file{Makefile.am} is overkill:
 @example
 dist-hook:
         mkdir $(distdir)/random
-        cp -p random/a1 random/a2 $(distdir)/random
+        cp -p $(srcdir)/random/a1 $(srcdir)/random/a2 $(distdir)/random
 @end example
 
 Automake also generates a @code{distcheck} target which can be help to