]> sourceware.org Git - automake.git/commitdiff
* automake.texi (Suffixes): Don't require SUFFIXES, but document
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 16 Nov 2001 10:31:51 +0000 (10:31 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 16 Nov 2001 10:31:51 +0000 (10:31 +0000)
its use for the "extreme" cases.

ChangeLog
NEWS
automake.texi
stamp-vti
version.texi

index b671ddf0a1a0909d61e3797ece24450aea301513..8ef11b41f7c5abb43404865cc7859ad25450dfb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-16  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * automake.texi (Suffixes): Don't require SUFFIXES, but document
+       its use for the "extreme" cases.
+
 2001-11-16  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * automake.in (rule_define): Use $KNOWN_EXTENSIONS_PATTERN
diff --git a/NEWS b/NEWS
index 1570615a93e3a01a76adfc6423f54b05c16342e0..455c3ced9d9e99fbc9b4ca43ebb833f88f038cb0 100644 (file)
--- 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.
index e1ec2e11fc788e30ab45f1f507a369029348ad1e..5924169f0b187031994536830d4bdaa2840e3a5e 100644 (file)
@@ -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
index 80eb78d3565cdef6dd41b58749703a6d093bc37a..5e4318c901b36b063935a07af42a8ce5ec6bf1fd 100644 (file)
--- 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
index 80eb78d3565cdef6dd41b58749703a6d093bc37a..5e4318c901b36b063935a07af42a8ce5ec6bf1fd 100644 (file)
@@ -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
This page took 0.044891 seconds and 5 git commands to generate.