GNU bug report logs -
#8362
make install prefix inserted in source code with generated python files
Previous Next
Full log
Message #21 received at 8362 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all.
A small contribution to the discussion.
First of all, it's not an Automake defect that the user is allowed
to override variables using the command line. This may be used e.g.
for changing compile flags at 'make' time:
make CFLAGS=-Wall
Second, in the provided example, the 'install' target indeed depends
on prog_PYTHON, while 'all' doesn't. Somebody made a decision to
compile Python files at install time and not at compile time. Maybe
because it is not known at compile time where the files will end up,
or they have conflicting names, or for some other good reason.
Third, and most important (I think) is that we need to note that
"prog/x.py" is GENERATED, but is NOT marked so. Adding
BUILT_SOURCES = prog/x.py
to Makefile.am fixes the issue immediately. So, sorry to say this, but
it looks like this defect is invalid. The file prog/x.py is meant to
be built/generated at build time and must be marked as being built.
Another point is that one needs to 'touch' x.src each time to test,
which also is signalling that something may be wrong. But, this may be
just a side effect of the minimalistic example.
By the way, if the real code also needs to substitute just
"$(libexecdir)", which is known at configure time, it should actually
be 'configure' which generates prog/x.py. This would probably stop
this issue from appearing in the first place...
If you really, really want to fix something in Automake, you can use
the attached patch, it seems to fix the issue. But, this is something
I don't recommend, because next we'll be adding each and every
language/script group to the 'all' target and that's probably not the
point. That's why I'm not formatting the patch as I should be.
--
Regards - Bogdan ('bogdro') D. (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux): http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft http://bogdro.evai.pl/soft4asm
www.Xiph.org www.TorProject.org www.LibreOffice.org www.GnuPG.org
[automake-python-in-all.diff (text/x-patch, attachment)]
This bug report was last modified 1 year and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.