[Top][All Lists]

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

Re: make -f $dir/Makefile clean

From: Allan Wind
Subject: Re: make -f $dir/Makefile clean
Date: Mon, 11 Nov 2002 10:41:53 -0500
User-agent: Mutt/1.4i

On 2002-11-11 09:16:27, Paul D. Smith wrote:
>   aw> I noticed in the archives that there is no way of getting the
>   aw> value of -f, but perhaps there is a way of solving this problem in
>   aw> a correct and elegant way?
> Not really; not in versions before 3.80.

What are you referring to in 3.80 that may help me out?

>  1) Don't use constructs like the find above; instead use something
>     like:
>         rm -f $(OBJECTS)

Same problem, really, unless you use absolute paths for your files
(aka your 2) ).

>  2) Set a variable in the Makefile which has the path of the directory:
>         THIS = some/dir
>             ...
>         clean:
>                 find $(THIS) -name \*.o | xargs rm -f

Ugly, but I considered it when used with autoconf.  Thanks for your
insight Paul.

Allan Wind
P.O. Box 2022
Woburn, MA 01888-0022

Attachment: pgplBiLlcBxpM.pgp
Description: PGP signature

reply via email to

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