Krolyxon
Commit 33b8148

Branches

Refs →

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.
Author
Tim Harder
Date
2014-10-25 12:30 -0400
Committer
Bert Münnich · 2014-10-25 19:06 +0200
Parent
c038283
Commit
33b8148614c47a091da1a711fb53f94827a9cf51

+4 −3

1 file changed

  1. M Makefile +4 −3
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = 1.3
1+VERSION = git-20141025
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
@@ -14,7 +14,8 @@ OBJ = $(SRC:.c=.o)
1414
1515 all: sxiv
1616
17−$(OBJ): Makefile config.h
17+$(OBJ): Makefile
18+$(OBJ) .depend: config.h
1819
1920 depend: .depend
2021
@@ -22,7 +23,7 @@ depend: .depend
2223 rm -f ./.depend
2324 $(CC) $(CFLAGS) -MM $^ >./.depend
2425
25−include .depend
26+-include .depend
2627
2728 .c.o:
2829 $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<