[Top][All Lists]

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

Re: pre- and post-compilation hooks

From: Ralf Wildenhues
Subject: Re: pre- and post-compilation hooks
Date: Wed, 12 Nov 2008 21:34:22 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Baurzhan,

* Baurzhan Ismagulov wrote on Wed, Nov 12, 2008 at 05:37:58PM CET:
> I'd like to migrate a SNiFF+ project to automake. So far, it looks quite
> promising. Two issues:
> 1. The compilation rule performs some custom pre-processing before
>    actually calling the compiler; if pre-processing fails, the compiler
>    is not called, and make is stopped.

What is SNiFF+, what does it do?  What are the input files?  If they
have different suffixes than the compiler, you can just use a (suffix)
rule to do the preprocessing.  Even if they have suffixes like .c, you
might be able to hack it by writing a rule like
  SUFFIXES = .c .processed.c

This will not be portable to some non-GNU make implementations, though.
(I think automake may warn, too.)

> 2. The Tasking C166/ST10 compiler doesn't support generating
>    dependencies, so I'd like to call gcc to do that if the compilation
>    was successful.
> How can I do that with automake?

If you --enable-dependency-tracking, then depcomp will try "expensive"
tracking methods, such as running 'makedepend'.

> I could only think about writing a wrapper around the compiler, but I'm
> wondering whether there is a better solution.

A wrapper is a solution, too, of course.

Hope that helps.


reply via email to

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