Author: tridge Date: 2005-07-13 07:44:27 +0000 (Wed, 13 Jul 2005) New Revision: 11
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=smb-build&rev=11 Log: fine tune the extra flags hack. I know this looks strange ... Modified: trunk/build/smb_build/makefile.pm trunk/testprog/testprog.c Changeset: Modified: trunk/build/smb_build/makefile.pm =================================================================== --- trunk/build/smb_build/makefile.pm 2005-07-13 06:59:52 UTC (rev 10) +++ trunk/build/smb_build/makefile.pm 2005-07-13 07:44:27 UTC (rev 11) @@ -198,11 +198,16 @@ my $flagsstr = ""; my $output; +# I know the EXTRA_CFLAGS and shell below looks redundent, but it isn't +# each works with a different type of make + $output = << "__EOD__"; # $comment +EXTRA_CFLAGS=script/cflags.sh \$\@ + .$src.$dst: [EMAIL PROTECTED] $message \$\*.$src - \$(CC) \$(TARGET_CFLAGS) \$(shell script/cflags.sh \$\@) \$(CFLAGS) $flags -c \$< -o \$\@ + \$(CC) \$(TARGET_CFLAGS) \$(EXTRA_CFLAGS:sh) \$(shell script/cflags.sh \$\@) \$(CFLAGS) $flags -c \$< -o \$\@ [EMAIL PROTECTED]@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@ __EOD__ Modified: trunk/testprog/testprog.c =================================================================== --- trunk/testprog/testprog.c 2005-07-13 06:59:52 UTC (rev 10) +++ trunk/testprog/testprog.c 2005-07-13 07:44:27 UTC (rev 11) @@ -1,5 +1,9 @@ #include "includes.h" +#ifndef TESTPROG_FLAGS +#error "the build hacks don't work" +#endif + int main(int argc,char *argv[]) { printf("I'm a happy test program\n");