$(top_srcdir) in Makefile.am

Adriaan de Groot adridg at cs.kun.nl
Wed Oct 30 11:51:42 GMT 2002


On Tuesday 29 October 2002 22:54, Michael Matz wrote:
> On Tue, 29 Oct 2002, Adriaan de Groot wrote:
> > In many Makefile.am's I see constructions like the following:
>
> Many?  Which?  I see this construct in exactly three Makefile.am's, two of
> them being useless

One, two, many. Maybe I've just been staring at kdoctools too long (related to 
KDELIBS_UNINSTALLED=yes failures on FreeBSD). 

> > [2] Why aren't backticks `(cd $(top_srcdir)/kdoctools && pwd)`
> > sufficient?
>
> $(shell) is a GNU make function, whereas `` is a shell functionality.  The
> difference is, that you can use `` only in the shell functions (i.e. the
> commands invoked for creating a target), whereas you can use $(shell)
> anywhere in the Makefile.  Compare e.g.:

Yes, of course. Here - kdoctools - it doesn't matter, since the variable is 
only used in the commands used to create meinproc targets. 

> > [4] Unfortunately, it doesn't work that easily. It doesn't get
> > substituted automatically, as far as i can tell, and adding an
>
> This is an error in the fast-perl machinery.  It doesn't duplicate enough
> of the sed expressions, which also means, that it wasn't working with
> older autoconf versions (but probably something like 2.13).  I.e. this

Patches for admin/config.pl and kdelibs/kdoctools/Makefile.am attached. Tested 
under FBSD 4.7 with perl 5.005_03 only. My only concern is that this adds a 
backtick expression to config.pl, which will mean starting a shell again for 
every Makefile.in processed. That might slow things down again unacceptably. 
While perl has a chdir() function, I can't find a cwd or pwd in perl.

[ade]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-pl.patch
Type: text/x-diff
Size: 906 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021030/092bf8c0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile-am.patch
Type: text/x-makefile
Size: 353 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021030/092bf8c0/attachment.bin>


More information about the kde-core-devel mailing list