From 171633de32eaa7cdd3039e4abf830f2b08ac7fe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bert=20M=C3=BCnnich?= <ber.t@posteo.de>
Date: Sun, 8 Oct 2017 20:23:16 +0200
Subject: [PATCH] Get rid of SRCDIR macro, VPATH on make cmd line suffices

---
 Makefile  | 6 ++----
 config.mk | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 9e29648..6bc10e4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,6 @@ all: sxiv
 
 include config.mk
 
-VPATH := $(SRCDIR)
-
 CPPFLAGS += -I. -DVERSION=\"$(VERSION)\" -DHAVE_GIFLIB=$(HAVE_GIFLIB) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF)
 DEPFLAGS := -MMD -MP
 
@@ -28,9 +26,9 @@ $(OBJ): config.h Makefile
 	@echo "CC $@"
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEPFLAGS) -c -o $@ $<
 
-config.h:
+config.h: | config.def.h
 	@echo "GEN $@"
-	cp $(SRCDIR)/config.def.h $@
+	cp $| $@
 
 sxiv:	$(OBJ)
 	@echo "LINK $@"
diff --git a/config.mk b/config.mk
index 3aa3cf2..cf2f946 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,3 @@
-SRCDIR    := .
-
 PREFIX    := /usr/local
 MANPREFIX := $(PREFIX)/share/man