automake
[Top][All Lists]
Advanced

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

Re: looking for a good example of non-recursive Make using project


From: Eric Blake
Subject: Re: looking for a good example of non-recursive Make using project
Date: Mon, 19 Nov 2012 08:36:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2

On 11/19/2012 12:51 AM, NightStrike wrote:
> If you include src/more/Makefile.am into src/Makefile.am (a perfectly
> valid thing to do), you will be unpleasantly surprised that
> src/more/Makefile.am has to actually know where it is in the source
> tree.  It needs lines like this:
> 
> prog_SOURCES += more/file3.c more/file4.c
> 
> and **NOT** this:
> 
> prog_SOURCES += file3.c file4.c
> 
> 
> It's really annoying.  It means that renaming a directory is reaaaaaaly hard.

You can reduce the pain by using variables:

more = more
prog_SOURCES += ${more}/file3.c ${more}/file4.c

so that a rename now only has to touch the 'more =' line, rather than
every use.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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