Ref: Relaxed constraints for mixing explicit and implicit rules in 4.1 ver
Even with gmake 4.1, I'm not able to work with make files having normal and implicit rules. But it works with
Given below code snippet:
test.c:
$ more Makefile
test %test: test.c
gcc -o test test.c
$ more test.c
#include <stdio.h>
int main()
{
printf("hellow world\n");
return 0;
}
When I used build with above Makefile with target name addtest, it throw an error:
$ ../make_41_src/make-4.1/make -f Makefile addtest
Makefile:1: *** mixed implicit and normal rules: deprecated syntax
make: *** No rule to make target 'addtest'. Stop.
$ ../make_41_src/make-4.1/make -version
GNU Make 4.1
Built for x86_64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
And later when I split the target as below in Makefile, it works: $ more Makefile
test: test.c
gcc -o test test.c
%test: test.c
gcc -o test test.c
$ ../make_41_src/make-4.1/make -f Makefile addtest
gcc -o test test.c
And test bin is created.
with version 3.81, Makefile with implicit and normal rules works
$ make -version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-redhat-linux-gnu
$ more Makefile
test %test: test.c
gcc -o test test.c
--
$ make -f Makefile addtest
gcc -o test test.c
test binary is created.