]> git.refcnt.org Git - colorize.git/commitdiff
Avoid gmake specific Makefile idiom
authorSteven Schubiger <stsc@refcnt.org>
Sun, 18 Aug 2013 20:44:00 +0000 (22:44 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Sun, 18 Aug 2013 20:44:00 +0000 (22:44 +0200)
Example make failure:
Using $< in a non-suffix rule context is a GNUmake idiom (line 11 of Makefile)

Makefile

index 41b8450d2b3344ce5eca77a95fb7604b0a97bc9e..7fa844799a9b1698e5ba6d7111b7451040cc59e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ CC=gcc
 CFLAGS=-Wall -Wextra -Wformat -Wswitch-default -Wuninitialized -Wunused -Wno-unused-function -Wno-unused-parameter
 
 colorize:      colorize.c
-                       $(CC) $(CFLAGS) -o $@ $< -DCFLAGS="$(CFLAGS)"
+                       $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)"
 
 check:
                        perl ./test.pl