osdir.com
mailing list archive
Mozy Online Backup: 2GB Free. Automatic. Secure.

Subject: Fix building outside srcdir - msg#00091

List: gnu.core-utils.bugs

Date: Prev Next Index Thread: Prev Next Index
This fixes a bug when building outside srcdir, especially when building
directly from CVS.

Andreas.

2003-10-17 Andreas Schwab <schwab@xxxxxxx>

* 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 > $@.n
+ $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) ../../src/$x > $@.n
mv $@.n $@
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 $@ $@t
sed -n '1,/^##test-files-begin/p' $< > $@t
tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
echo "x = $$tool" >> $@t
- $(PERL) -I$(srcdir) -w -- $(mk_script) --list >> $@t
+ $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> $@t
sed -n '/^##test-files-end/,$$p' $< >> $@t
mv $@t $@
--- 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, schwab@xxxxxxx
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."


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: rm -f: don't confuse turning off prompting and error output

A> Which part of "Ignore nonexistent files" did you not understand? I see. OK, however, "new flag(s) should be added to separate the double actions of -f" then, without resorting to <&-, 2>&- etc.

Next Message by Date: click to view message preview

man mv punctuation deficiency

I see four sentences written as two: $ man mv -f, --force do not prompt before overwriting equivalent to --reply=yes -i, --interactive prompt before overwrite equivalent to --reply=query also, it appears to the user, that one must be the default behaviour, so say so right there, else looks schizophrenic.

Previous Message by Thread: click to view message preview

cpio --preserve-modification-time: files but not directories

$ cpio --version GNU cpio version 2.5 Sounds like yours. Then put bug reporting addresses in --help, man, and info! $ find *|cpio -dmp /tmp/zzz $ info cpio `-m, --preserve-modification-time' Retain previous file modification times when creating files. But not directories! So say so in man and info. Or better yet, kindly implement it. Either way, must mention how you treat directories too. Not everybody agrees that directories are just one type of file and thus can be silently skipped over in the spec. No, I didn't try `-a, --reset-access-time' but I suspect the worst. Mention what you do about directories too there.

Next Message by Thread: click to view message preview

Re: Fix building outside srcdir

Andreas Schwab <schwab@xxxxxxx> wrote: > 2003-10-17 Andreas Schwab <schwab@xxxxxxx> > > * 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. Thanks. I've applied that and updated mk-script's `Usage' message accordingly.
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by