[hackers] [farbfeld] Makefile-workaround for OpenBSD || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Mon, 29 May 2017 18:32:19 +0200 (CEST)

commit bfb27d1baad6f69fa610281809a394617a76e60a
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Mon May 29 18:29:00 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Mon May 29 18:29:00 2017 +0200

    Makefile-workaround for OpenBSD
    
    Thanks Hiltjo for reporting this!
    
    For some reason, OpenBSD make does not add $(BIN).o to the dependency list
    when it sees the $(BIN) target rule. It does so however when it does the
    conversion from .c to .o.
    This behaviour is unique for OpenBSD make as far as I've seen, and for
    the time being, this workaround will manually add the object to the
    dependency list.
    This is not POSIX compliant and in GNU make it just evaluates to an
    empty string, but it works until this has been investigated further.

diff --git a/Makefile b/Makefile
index 27dc544..5cf2e17 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -18,7 +18,7 @@ ff2jpg-LDLIBS = $(JPG-LDLIBS)
 
 all: $(BIN)
 
-$(BIN): $(REQ:=.o)
+$(BIN): $(_AT_:=.o) $(REQ:=.o)
 
 $(BIN:=.o): config.mk $(HDR) $(REQ:=.h)
 
Received on Mon May 29 2017 - 18:32:19 CEST

This archive was generated by hypermail 2.3.0 : Mon May 29 2017 - 18:36:18 CEST