[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: substitute datadir in python script
From: |
Ralf Wildenhues |
Subject: |
Re: substitute datadir in python script |
Date: |
Sun, 8 Mar 2009 10:53:27 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Bastien,
* Bastien Dalla Piazza wrote on Sat, Mar 07, 2009 at 01:51:32PM CET:
>
> ascript.py: ascript_src.py
> sed -e
> "s#sys.append('pyexecdir')#sys.append('$(pyexecdir)')#g;s#datadir#
> $(datadir)/@PACKAGE@/#g" ascript_src.py > ascript.py
This looks good to me, except that, in the rule command, I guess you
should be using $(srcdir) if the input file is distributed. You can
portably use $@ for the target, though:
ascript.py: ascript_src.py
sed -e
"s#sys.append('pyexecdir')#sys.append('$(pyexecdir)')#g;s#datadir#
$(datadir)/@PACKAGE@/#g" $(srcdir)/ascript_src.py > $@
> I think I need an equivalent in python of the "config.h" header file,
> but where to install it?
Well, config.h headers are often compiler-specific, and use a global
name space so headers generated from different packages clash, so they
should not ever be installed; nor should installed header files depend
upon config.h.
Hope that helps.
Cheers,
Ralf