[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extending default suffix rules.

From: Remco Bras
Subject: Re: Extending default suffix rules.
Date: Sun, 2 Mar 2008 15:10:58 +0100
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)


Op Sunday 02 March 2008 10:42:04 schreef Ralf Wildenhues:
> * Remco Bras wrote on Fri, Feb 29, 2008 at 11:37:01PM CET:
> > as part of my work on GNU RPGE, I've had to 'extend' the automake suffix
> > rule for compiling .c files to .o ones.
> Why, what limitation made this necessary, and how exactly do your
> changed rules/macros look like?  Maybe it can be solved in a different
> way without breakage.

It's more of a convenience, being that the .c files are preprocessed using sed 
to generate some common function definitions without having to write them all 
out by hand.  The changed rule is as follows:

        $(top_srcdir)/ $< && $(CC) $(CFLAGS) $(AM_CFLAGS) -o $@ -c 
$< && 
cp $<{.backup,} && rm $<.backup copies the original .c file to a .c.backup equivalent and 
invokes sed a few times on the original. Once done, the cp and rm commands 
are meant to restore the original version of the original, so that the 
abbreviation can remain in place.

> > In the docs, I could not find a variable
> > containing the default suffix rule for this purpose, so I replaced the
> > entirity of it.
> It's hard-coded in (see the register_language calls).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]