On Wed, 2008-09-24 at 13:20 -0700, Greg Ortiz wrote:
> Getting a 'target pattern contains no '%' from running a simple make.
> Running make from OpenSuse using GNU make 3.8.1.  Any help would be
> greatly appreciated.

You mean 3.81.  There is no 3.8.1.  Also, please choose ONE mailing list
rather than all of them :-)

> Makefile
> ------------------
> hello: 
>     echo $@
>     make -f include.mk hello
>  
> include.mk
> ------------------
> hello: hello.o
>      cc -c hello.c
>  
> hello.o: $${@:%.o=%.c}
>   cc -c hello.c

If you want to use secondary expansion in GNU make 3.81 you have to set
the pseudo-target .SECONDEXPANSION: in your makefile somewhere.

See the 'Secondary Expansion' section of the GNU make manual.




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to