--Boundary-00=_Of8v9Ed7r7tA/P2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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] --Boundary-00=_Of8v9Ed7r7tA/P2 Content-Type: text/x-diff; charset="iso-8859-1"; name="config-pl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="config-pl.patch" --- ./kdesdk/kapptemplate/admin/config.pl Tue Sep 24 22:02:00 2002 +++ kde-common/admin/config.pl Wed Oct 30 12:38:26 2002 @@ -38,7 +38,7 @@ #print "ac_given_srcdir=$ac_given_srcdir\n"; #print "ac_given_INSTALL=$ac_given_INSTALL\n"; -my ($srcdir, $top_srcdir); +my ($srcdir, $top_srcdir, $abs_top_srcdir); my $INSTALL; my $bad_perl = ($] < 5.005); @@ -153,6 +153,9 @@ $top_srcdir = $ac_dots.$ac_given_srcdir; } + $abs_top_srcdir=`cd $top_srcdir && pwd` ; + chomp $abs_top_srcdir; + if ($ac_given_INSTALL) { if ($ac_given_INSTALL =~ m%^/% ) { $INSTALL = $ac_given_INSTALL; @@ -202,6 +205,7 @@ $filedata =~ s%\@configure_input\@%$configure_input%g; $filedata =~ s%\@srcdir\@%$srcdir%g; $filedata =~ s%\@top_srcdir\@%$top_srcdir%g; + $filedata =~ s%\@abs_top_srcdir\@%$abs_top_srcdir%g; $filedata =~ s%\@INSTALL\@%$INSTALL%g; if ($bad_perl) { --Boundary-00=_Of8v9Ed7r7tA/P2 Content-Type: text/x-makefile; charset="iso-8859-1"; name="Makefile-am.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Makefile-am.patch" --- Makefile.am.orig Wed Oct 30 12:42:36 2002 +++ Makefile.am Wed Oct 30 12:38:36 2002 @@ -3,7 +3,7 @@ LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -AM_CPPFLAGS = -DSRCDIR="\"$(shell (cd $(top_srcdir)/kdoctools && pwd))\"" +AM_CPPFLAGS = -DSRCDIR="\"@abs_top_srcdir@\"" noinst_LTLIBRARIES = libkbzipfilter_dummy.la --Boundary-00=_Of8v9Ed7r7tA/P2--