nsxiv33b8148
Fix Makefile depend file usage
Creating the .depend file requires the config.h file to exist and suppress make's complaints if the .depend file doesn't exist when initially parsing the makefile.
+4 −3
1 file changed
- M Makefile +4 −3
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = 1.3 | |
| 1 | + | VERSION = git-20141025 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -14,7 +14,8 @@ OBJ = $(SRC:.c=.o) | |||
| 14 | 14 | ||
| 15 | 15 | all: sxiv | |
| 16 | 16 | ||
| 17 | − | $(OBJ): Makefile config.h | |
| 17 | + | $(OBJ): Makefile | |
| 18 | + | $(OBJ) .depend: config.h | |
| 18 | 19 | ||
| 19 | 20 | depend: .depend | |
| 20 | 21 | ||
| @@ -22,7 +23,7 @@ depend: .depend | |||
| 22 | 23 | rm -f ./.depend | |
| 23 | 24 | $(CC) $(CFLAGS) -MM $^ >./.depend | |
| 24 | 25 | ||
| 25 | − | include .depend | |
| 26 | + | -include .depend | |
| 26 | 27 | ||
| 27 | 28 | .c.o: | |
| 28 | 29 | $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $< | |