summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2014-10-25 18:30:19 +0200
committerBert Münnich <ber.t@posteo.de>2014-10-25 19:06:46 +0200
commit33b8148614c47a091da1a711fb53f94827a9cf51 (patch)
tree3118f8af7e20ca16aa8464247c135dbe320fdfb4
parentc038283286f1ea6b351b6fa244cbdd660b67066c (diff)
downloadnsxiv-33b8148614c47a091da1a711fb53f94827a9cf51.tar.zst
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.
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9282884..3926145 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = 1.3
+VERSION = git-20141025
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
@@ -14,7 +14,8 @@ OBJ = $(SRC:.c=.o)
all: sxiv
-$(OBJ): Makefile config.h
+$(OBJ): Makefile
+$(OBJ) .depend: config.h
depend: .depend
@@ -22,7 +23,7 @@ depend: .depend
rm -f ./.depend
$(CC) $(CFLAGS) -MM $^ >./.depend
-include .depend
+-include .depend
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<