[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
include verbatim or (escape %D%) possible?
From: |
Thomas Martitz |
Subject: |
include verbatim or (escape %D%) possible? |
Date: |
Fri, 24 Jul 2015 23:15:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Hello,
my name is Thomas Martitz and I'd say quite knowledgeable with automake.
However I've hit a road block that I'm unable to resolve. I'm also new
to this list, so please bear with me.
I'm trying to port a project to non-recursive automake following[1]. I
have come across a problem with this specific project. It uses
convinience mk that are included by various Makefile.ams. For example,
one of those convinience .mk files fills EXTRA_DIST with files that are
expected in the directory of the Makefile.am. Below is a very simplified
example of that project.
$ cat build/vars.mk
EXTRA_DIST=README COPYING
$ cat plugin1/Makefile.am
include $(top_srcdir)/build/vars.mk
$ ls plugin1/{README,COPYING}
plugin1/README plugin1/COPYING
$ cat Makefile.am
SUBDIRS = plugin1
Now, the problem comes when I try to port that Makefile.am to be
included by the top-level Makefile.am
$ cat Makefile.am
EXTRA_DIST=
include plugin1/Makefile.am
$ cat build/vars.mk
EXTRA_DIST+=README COPYING
The problem: README and COPYING are now assumed to be in the root
directory (which is understandable, given vars.mk now is indirectly
included by top-level Makefile.am).
I tried to use %reldir% / %D%:
$ cat build/vars.mk
EXTRA_DIST+=%D%/README %D%7COPYING
But the effect is that README and COPYING are assumed to be in the
*build* directory. I guess this is because %D% is expanded to the dir of
the actual fragment file where it's used in.
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?
Please help me.
Best regards
Thomas Martitz
[1]: http://karelzak.blogspot.de/2013/02/non-recursive-automake.html
- include verbatim or (escape %D%) possible?,
Thomas Martitz <=