Description: Fix the build file and directory dependencies.
 Create a build/created.stamp file and depend on it instead of
 the build/ directory itself when checking for stale object and
 executable files. This fixes a problem with make(1) considering
 everything as out of date since the build/ directory's timestamp
 has been updated after the object files within it.
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2020-10-14

--- a/Makefile.in
+++ b/Makefile.in
@@ -53,8 +53,9 @@
 
 $(OBJECTS): config.h Makefile
 
-build:
-	mkdir build
+build/created.stamp:
+	[ -d build ] || mkdir build
+	touch build/created.stamp
 
 build/%.o: %.c
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
@@ -196,6 +197,6 @@
 idev.so: idev.c config.h
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -g -fPIC idev.c -o $@ $(LIBS)
 
-$(DEPS): | build
+$(DEPS): | build/created.stamp
 
 include $(DEPS)
