From: Alexandre Duret-Lutz Date: Fri, 16 Nov 2001 10:31:51 +0000 (+0000) Subject: * automake.texi (Suffixes): Don't require SUFFIXES, but document X-Git-Tag: Release-1-5b~23 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=0452e82c83ec8a8c72fb09a802dc3dce82ea3016;p=automake.git * automake.texi (Suffixes): Don't require SUFFIXES, but document its use for the "extreme" cases. --- diff --git a/ChangeLog b/ChangeLog index b671ddf0..8ef11b41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-16 Alexandre Duret-Lutz + + * automake.texi (Suffixes): Don't require SUFFIXES, but document + its use for the "extreme" cases. + 2001-11-16 Alexandre Duret-Lutz * automake.in (rule_define): Use $KNOWN_EXTENSIONS_PATTERN diff --git a/NEWS b/NEWS index 1570615a..455c3ced 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ New in 1.5a: and AC_). * `#line' of Lex and Yacc files are properly set. * EXTRA_DIST can contain generated directories. +* Support for dot-less extensions in suffix rules. * Fixed CDPATH portability problems, in particular for MacOS X. * Fixed handling of nobase_ targets. * Fixed support of implicit rules leading to .lo objects. diff --git a/automake.texi b/automake.texi index e1ec2e11..5924169f 100644 --- a/automake.texi +++ b/automake.texi @@ -3988,19 +3988,18 @@ variable @code{GTAGS_ARGS} holds arguments which are passed to @cindex Adding new SUFFIXES @cindex SUFFIXES, adding +@vindex SUFFIXES It is sometimes useful to introduce a new implicit rule to handle a file -type that Automake does not know about. If this is done, you must -notify GNU Make of the new suffixes. This can be done by putting a list -of new suffixes in the @code{SUFFIXES} variable. -@vindex SUFFIXES +type that Automake does not know about. For instance, suppose you had a compiler which could compile @samp{.foo} -files to @samp{.o} files. Then you would add @samp{.foo} to your suffix -list: +files to @samp{.o} files. You would simply define an suffix rule for +your language: @example -SUFFIXES = .foo +.foo.o: + foocc -c -o $@@ $< @end example Then you could directly use a @samp{.foo} file in a @samp{_SOURCES} @@ -4011,9 +4010,29 @@ bin_PROGRAMS = doit doit_SOURCES = doit.foo @end example -Any given @code{SUFFIXES} go at the start of the generated suffixes -list, followed by automake generated suffixes not already in the list. +This was the simpler and more common case. In other cases, you will +have to help Automake to figure which extensions you are defining your +suffix rule for. This usually happens when your extensions does not +start with a dot. Then, all you have to do is to put a list of new +suffixes in the @code{SUFFIXES} variable @strong{before} you define your +implicit rule. + +For instance the following definition prevents Automake to misinterpret +@samp{.idlC.cpp:} as an attemp to transform @samp{.idlC} into +@samp{.cpp}. + +@example +SUFFIXES = .idl C.cpp +.idlC.cpp: + # whatever +@end example +As you may have noted, the @code{SUFFIXES} macro behaves like the +@code{.SUFFIXES} special target of @code{make}. You should not touch +@code{.SUFFIXES} yourself, but use @code{SUFFIXES} instead and let +Automake generate the suffix list for @code{.SUFFIXES}. Any given +@code{SUFFIXES} go at the start of the generated suffixes list, followed +by Automake generated suffixes not already in the list. @node Multilibs, , Suffixes, Miscellaneous @section Support for Multilibs diff --git a/stamp-vti b/stamp-vti index 80eb78d3..5e4318c9 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 9 November 2001 +@set UPDATED 16 November 2001 @set UPDATED-MONTH November 2001 @set EDITION 1.5a @set VERSION 1.5a diff --git a/version.texi b/version.texi index 80eb78d3..5e4318c9 100644 --- a/version.texi +++ b/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 9 November 2001 +@set UPDATED 16 November 2001 @set UPDATED-MONTH November 2001 @set EDITION 1.5a @set VERSION 1.5a