This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Ulrich Drepper <drepper@redhat.com> writes: > Why do you have to do this in the first place? Make's pattern > matching should help you to avoid this. The pattern is %.out: %.input. That works fine for existing foo.out: foo.input, but BP tests send output to foo-bp.out which according to the pattern wants foo-bp.input. I just tried adding a BP-specific rule, and that does what I want. I had thought about it earlier, but didn't even try it because I had an ungrounded fear of conflicting rules. New pattern: $(objpfx)%-bp.out: %.input $(objpfx)%-bp supplemnts old pattern: $(objpfx)%.out: %.input $(objpfx)% Here's a revised patch. OK? Index: Rules =================================================================== RCS file: /cvs/glibc/libc/Rules,v retrieving revision 1.96 diff -u -p -r1.96 Rules --- Rules 2000/07/26 18:18:42 1.96 +++ Rules 2000/07/29 00:17:25 @@ -129,12 +129,20 @@ endif ifneq "$(strip $(tests) $(test-srcs))" "" # These are the implicit rules for making test outputs # from the test programs and whatever input files are present. + +make-test-out = GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ + $($(subst -bp,,$*)-ENV) $(built-program-cmd) \ + $($(subst -bp,,$*)-ARGS) +save-core-dump = { status=$$?; \ + test -f core && mv core $(built-program-file).core; \ + exit $$status; } +$(objpfx)%-bp.out: %.input $(objpfx)%-bp + $(make-test-out) > $@ < $(word 1,$^) || $(save-core-dump) $(objpfx)%.out: %.input $(objpfx)% - GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ - $($*-ENV) $(built-program-cmd) $($*-ARGS) < $(word 1,$^) > $@ + $(make-test-out) > $@ < $(word 1,$^) || $(save-core-dump) $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence. - GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ - $($*-ENV) $(built-program-cmd) $($*-ARGS) > $@ + $(make-test-out) > $@ || $(save-core-dump) + endif # tests .PHONY: distclean realclean subdir_distclean subdir_realclean \
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |