bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix building outside srcdir


From: Andreas Schwab
Subject: Fix building outside srcdir
Date: Fri, 17 Oct 2003 15:59:48 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

This fixes a bug when building outside srcdir, especially when building
directly from CVS.

Andreas.

2003-10-17  Andreas Schwab  <address@hidden>

        * tests/mk-script: Get $srcdir from first parameter instead of
        hardcoding it.

        * tests/Makefile.am.in ($(srcdir)/$x-tests): Pass $(srcdir) as
        first argument of mk-script.
        ($(srcdir)/Makefile.am): Likewise.  Prepend $(srcdir) to target.

--- tests/Makefile.am.in.~1.6.~ 2003-04-16 00:18:12.000000000 +0200
+++ tests/Makefile.am.in        2003-10-17 15:37:35.000000000 +0200
@@ -12,7 +12,7 @@ TESTS = $x-tests
 
 mk_script = $(srcdir)/../mk-script
 $(srcdir)/$x-tests: $(mk_script) Test.pm
-       $(PERL) -I$(srcdir) -w -- $(mk_script) ../../src/$x > address@hidden
+       $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) ../../src/$x > 
address@hidden
        mv address@hidden $@
        chmod 755 $@
 
@@ -21,11 +21,11 @@ CLEANFILES = $(run_gen)
 
 check: $(maint_gen)
 
-Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
+$(srcdir)/Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
        rm -f $@ address@hidden
        sed -n '1,/^##test-files-begin/p' $< > address@hidden
        tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
          echo "x = $$tool" >> address@hidden
-       $(PERL) -I$(srcdir) -w -- $(mk_script) --list >> address@hidden
+       $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> 
address@hidden
        sed -n '/^##test-files-end/,$$p' $< >> address@hidden
        mv address@hidden $@
--- tests/mk-script.~1.9.~      2003-08-12 20:19:42.000000000 +0200
+++ tests/mk-script     2003-10-17 15:27:55.000000000 +0200
@@ -15,7 +15,7 @@ use POSIX qw (assert);
 BEGIN { push @INC, '.' if '.' ne '.'; }
 use Test;
 
-my $srcdir = '.';
+my $srcdir = shift;
 
 sub validate
 {

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]