With pmake (BSD make) on GNU/Linux, some failures | FAIL: ansi6.test | FAIL: ansi7.test | FAIL: ansi9.test | FAIL: ansi10.test
happen because the `./ansi2knr' program doesn't match the `ansi2knr' rule, thus pmake chooses its internal rule to compile C sources: | gcc -g -O2 -o ./ansi2knr ./ansi2knr.c thus the $(DEFS) don't get picked up: | ./ansi2knr.c:184: error: conflicting types for 'malloc' | ./ansi2knr.c:184: error: conflicting types for 'malloc' I think the patch below fixes that. The issue also happens on BSD systems, except that there it just doesn't happen to turn into a test failure due to less conflicting malloc declarations: | ./ansi2knr.c:184: warning: conflicting types for built-in function 'malloc' OK? Or do we give up on KnR anyway and remove ansi2knr and its support code? Cheers, Ralf * lib/am/ansi2knr.am (ansi2knr): Rename target as.. (./ansi2knr): ..this, for BSD make. (%ANSI2KNR-DIR%/ansi2knr): Adjust. Index: lib/am/ansi2knr.am =================================================================== RCS file: /cvs/automake/automake/lib/am/ansi2knr.am,v retrieving revision 1.6 diff -u -r1.6 ansi2knr.am --- lib/am/ansi2knr.am 14 May 2005 20:28:51 -0000 1.6 +++ lib/am/ansi2knr.am 2 May 2006 18:10:28 -0000 @@ -29,14 +29,14 @@ ANSI2KNR = %ANSI2KNR-DIR%/ansi2knr %ANSI2KNR-DIR%/ansi2knr: - cd %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ansi2knr + cd %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr else !%?ANSI2KNR-DIR% ## Substitution from AM_C_PROTOTYPES. This makes it be built only when ## necessary. ANSI2KNR = @ANSI2KNR@ -ansi2knr: ansi2knr.$(OBJEXT) +./ansi2knr: ansi2knr.$(OBJEXT) $(LINK) ansi2knr.$(OBJEXT) $(LIBS) ansi2knr.$(OBJEXT): $(CONFIG_HEADER)