aboutsummaryrefslogtreecommitdiffstats
path: root/ChangeLog.txt
diff options
context:
space:
mode:
authorSeebs <seebs@seebs.net>2017-02-03 12:31:40 -0600
committerSeebs <seebs@seebs.net>2017-02-03 12:31:40 -0600
commit1192126f1852dfc13432f0807e577da30ef6f228 (patch)
tree59f27e0b6ff615a5a7c1d221b335ac2a22bb33ab /ChangeLog.txt
parentfb3a0eeb7def32aaf2288e1b73573eb2f1862acf (diff)
downloadpseudo-1192126f1852dfc13432f0807e577da30ef6f228.tar.gz
pseudo-1192126f1852dfc13432f0807e577da30ef6f228.tar.bz2
pseudo-1192126f1852dfc13432f0807e577da30ef6f228.zip
Makefile.in: Stop rebuilding binaries so much.
Currently, the Makefile rebuilds the binary at every invokation of the command make: $ make cc -pipe -std=gnu99 -Wall -W -Wextra -fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE -m64 -DPSEUDO_PREFIX='"/opt"' -DPSEUDO_SUFFIX='""' -DPSEUDO_BINDIR='"bin"' -DPSEUDO_LIBDIR='"lib64"' -DPSEUDO_LOCALSTATEDIR='"var/pseudo"' -DPSEUDO_VERSION='"1.8.1"' -DUSE_MEMORY_DB -DPSEUDO_PASSWD_FALLBACK='""' -DPSEUDO_XATTR_SUPPORT -O2 -g -o bin/pseudo \ pseudo.o pseudo_server.o pseudo_client.o pseudo_ipc.o \ pseudo_db.o pseudo_tables.o pseudo_util.o -lsqlite3 -lpthread -ldl -lpthread cc -pipe -std=gnu99 -Wall -W -Wextra -fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE -m64 -DPSEUDO_PREFIX='"/opt"' -DPSEUDO_SUFFIX='""' -DPSEUDO_BINDIR='"bin"' -DPSEUDO_LIBDIR='"lib64"' -DPSEUDO_LOCALSTATEDIR='"var/pseudo"' -DPSEUDO_VERSION='"1.8.1"' -DUSE_MEMORY_DB -DPSEUDO_PASSWD_FALLBACK='""' -DPSEUDO_XATTR_SUPPORT -O2 -g -o bin/pseudodb pseudodb.o \ pseudo_db.o pseudo_tables.o pseudo_util.o pseudo_ipc.o -lsqlite3 -lpthread -ldl -lpthread The fault comes from the $(BIN) directory prerequesite. According to the documention of GNU make(*), directory prerequesites normally go to <order-only-prerequisites>: targets: normal-prerequisites | order-only-prerequisites > Consider an example where your targets are to be placed in a separate > directory, and that directory might not exist before make is run. In > this situation, you want the directory to be created before any > targets are placed into it but, because the timestamps on directories > change whenever a file is added, removed, or renamed, we certainly > don’t want to rebuild all the targets whenever the directory’s > timestamp changes. One way to manage this is with order-only > prerequisites: make the directory an order-only prerequisite on all > the targets. > > OBJDIR := objdir > OBJS := $(addprefix $(OBJDIR)/,foo.o bar.o baz.o) > > $(OBJDIR)/%.o : %.c > $(COMPILE.c) $(OUTPUT_OPTION) $< > > all: $(OBJS) > > $(OBJS): | $(OBJDIR) > > $(OBJDIR): > mkdir $(OBJDIR) > > Now the rule to create the objdir directory will be run, if needed, > before any ‘.o’ is built, but no ‘.o’ will be built because the > objdir directory timestamp changed. This patch fixes this behavior. No binaries are rebuilt when the command make is re-run: $ make make: Nothing to be done for 'all'. *: https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> Signed-off-by: Seebs <seebs@seebs.net>
Diffstat (limited to 'ChangeLog.txt')
-rw-r--r--ChangeLog.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 0191a8e..ae2a6e9 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2017-02-03:
+ * (gportay) contributed fix to Makefile (fix binaries rebuild).
+
2017-02-01:
* (seebs) handle xattr deletion slightly more carefully.
* (seebs) tag this as 1.8.2