[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] build: run checks in distinct directories
From: |
Akim Demaille |
Subject: |
Re: [PATCH 2/2] build: run checks in distinct directories |
Date: |
Fri, 14 Dec 2012 13:35:26 +0100 |
Le 14 déc. 2012 à 11:09, Théophile Ranquet <address@hidden> a écrit :
>> I'd prefer that you use && instead of ;, and that you:
>>
>> RUN_TESTSUITE = \
>> foo \
>> bar \
>> baz
>>
>> instead.
>
> So, like this?
>
> -# Move into tests/ so that testsuite.dir etc. be created there.
> -RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS)
> +# Move into tests/ so that testsuite.dir etc. be created there. If a suffix
> is
> +# specified, create it in a corresponding subdirectory of tests/.
> +RUN_TESTSUITE = dir=tests/$$suf \
> + && (test -d $$dir || mkdir $$dir) \
> + && (test -f $$dir/atconfig \
> + || cp tests/atconfig $$dir) \
> + && (test -f $$dir/atlocal \
> + || cp tests/atlocal $$dir) \
> + && $(TESTSUITE) -C $$dir $(TESTSUITEFLAGS)
No, more like this:
RUN_TESTSUITE = \
dir=tests/$$suf \
&& { test -d $$dir || mkdir $$dir; } \
&& { test -f $$dir/atconfig || cp tests/atconfig $$dir; } \
&& { test -f $$dir/atlocal || cp tests/atlocal $$dir; } \
&& $(TESTSUITE) -C $$dir $(TESTSUITEFLAGS)
Note that:
- ( ) is a subshell, this is uselessly expensive
- this scheme does not ensure that if atconfig etc. change,
we propagate the changes, this is wrong.
We should probably expose even _more_ things to Make and let
dependencies do all this.
>> Please, also prepare a patch where the names are more consistent, and
>> README-hacking is updated to reflect these changes.
>
> On second thoughts, I like the difference in names. The task
> accomplished by maintainer-{push,xml}-check really is on a different
> level from that accomplished by maintainer -check-*. However, we might
> want to consider the following, if there is no real motivation to keep
> the 'push' and the 'xml' checks distinct.
>
> .PHONY: maintainer-release-check
> -maintainer-release-check: maintainer-check maintainer-push-check
> maintainer-xml-check
> +maintainer-release-check:
> + $(MAKE) $(AM_MAKEFLAGS) maintainer-check \
> + TESTSUITEFLAGS='BISON_TEST_XML=1 \
> + BISON_USE_PUSH_FOR_PULL=1 \
> + $(TESTSUITEFLAGS)'
Good idea. But then, I'd prefer to have a --maintainer option added
to the testsuite, and you'd pass these flags instead of fiddling with
variables. See what's done for --compile-c-with-c++ to see what I
mean.