[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: include verbatim or (escape %D%) possible?
From: |
Bob Friesenhahn |
Subject: |
Re: include verbatim or (escape %D%) possible? |
Date: |
Sat, 25 Jul 2015 09:11:34 -0500 (CDT) |
User-agent: |
Alpine 2.01 (GSO 1266 2009-07-14) |
On Fri, 24 Jul 2015, Thomas Martitz wrote:
So what I'm asking is: Can I somehow raw/verbatim include into
plugin1/Makefile.am so that %D% refers to plugin1? Or is there some way to
escape %D% once? Or is there another way to have README refer to the
plugin1/README file by using the convinience .mk file?
Given that everything ends up in one Makefile, I don't think that
including any given .mk file more than once is going to work at all.
The strategy of incuding common .mk files into a per-directory
Makefile is to support recursive build schemes.
Nothing prevents from using a script which builds specialized .mk
files for each subdirectory. A template file can be used with
substitutions performed on it to localize it for the subdirectory.
If there are a great many similar subdirectories, the same script can
write a .mk file with include statements to also include the many
subdirectory fragments.
When I converted my project to be non-recursive, it was before
Automake included any special support for includes in non-recursive
builds. I hard-coded the sub-directory offset inside each included
.mk file via a definition and then built all needed definitions based
on that. I did not even trust += syntax (due to lack of control over
order) so everything is explicit. This was ok since there were not
hundreds of subdirectories.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/