From 9d4187474da788bad92899717ea2f3a53bf52f28 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 27 Sep 1998 22:32:57 +0000 Subject: [PATCH] * automake.texi: Document LIBOBJS trick. --- ChangeLog | 2 ++ TODO | 6 ++++++ automake.in | 2 +- automake.texi | 16 +++++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b5d16be..acc55ddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Sun Sep 27 20:02:21 1998 Tom Tromey + * 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 5efc8654..83ba35eb 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,12 @@ * 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 = ... diff --git a/automake.in b/automake.in index b865e1a7..5858450d 100755 --- a/automake.in +++ b/automake.in @@ -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) { diff --git a/automake.texi b/automake.texi index f4e8a5d1..cf8b6f10 100644 --- a/automake.texi +++ b/automake.texi @@ -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 -- 2.43.5