Alexandre Julliard julliard@winehq.org writes:
Ferenc Wagner wferi@afavant.elte.hu writes:
What about this:
makename="$BINDIR/`dirname $test`/Makefile.in" [...] sed -n '/^CTESTS =/,/[^\]$/{s/^CTESTS =//;s/\\$//;s/\([0-9a-zA-Z_]*\)\.c/"\1",/g;p;}' $makename
that is, extracting the subtest names from the corresponding Makefile.in?
It's still fairly ugly IMO. Doing this at run time would be a lot cleaner.
String processing in C is seldom clean, especially if you want to make it portable... But for the challenge, I gave it a shot.
It took 79 (not exactly clean) lines (get_subtests). If you still prefer this, be it. The build definitely got simpler.
But anyway, please tell all your objections, so that we can work towards making it suitable for inclusion! I am sending a tarball of the present state to this thread shortly.
Feri.