Repository : ssh://git@open-mesh.org/batctl
On branch : next
commit 4c5c86ec1bba9eb41ba3e74c2312cdcbe5a787cc Author: Sven Eckelmann sven@narfation.org Date: Tue Sep 10 23:12:01 2013 +0200
batctl: Don't fail rebuild when header is removed
The *.d depends files for make just list the files used when building an object file. Removing a file listed in such a dependency file causes make to search for a way to recreate it. This usually cannot work because these files aren't autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing a file in a dependency list will then execute this empty rule and continue with the execution of the creation of the object file. This compilation process will then automatically correct the dependency file.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
4c5c86ec1bba9eb41ba3e74c2312cdcbe5a787cc Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index 9e7c5be..166dcf8 100755 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ OBJ_BISECT = bisect_iv.o MANPAGE = man/batctl.8
# batctl flags and options -CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD +CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP CPPFLAGS += -D_GNU_SOURCE LDLIBS += -lm