aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraglitke <aglitke@aglitke.localdomain>2006-09-22 12:48:22 -0500
committeraglitke <aglitke@aglitke.localdomain>2006-09-22 12:48:22 -0500
commitb0618a3781e0febc8a20e072802d7021d4074977 (patch)
treefc292c48975ebac981f4ff9ecd3473aaf6cd42ff
parent55f2a7fb2f0a1a333e3c252b660e77d83ac866f7 (diff)
downloadlibhugetlbfs-dev-20060922.tar.gz
build: Fixes to binary versioningdev-20060922
Just a few minor fixes to the make rules so that versioning works more smoothly: 1) Conditional including of .d files to avoid remaking them when not needed. 2) Specify the $SOURCE variable so modifications will be detected. Signed-off-by: Adam Litke <agl@us.ibm.com>
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bdb0d7f..caf2255 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
LDSCRIPT_TYPES = B BDT
INSTALL_OBJSCRIPT = ld.hugetlbfs
VERSION=version.h
+SOURCE = $(shell find . -maxdepth 1 ! -name version.h -a -name '*.[h]')
+SOURCE += *.c *.lds Makefile
+NODEPTARGETS=<version.h> <clean>
INSTALL = install
@@ -189,7 +192,13 @@ clean:
%.d: %.c $(VERSION)
@$(CC) $(CPPFLAGS) -MM -MT "$(foreach DIR,$(OBJDIRS),$(DIR)/$*.o) $@" $< > $@
+# Workaround: Don't build dependencies for certain targets
+# When the include below is executed, make will use the %.d target above to
+# generate missing files. For certain targets (clean, version.h, etc) we don't
+# need or want these dependency files, so don't include them in this case.
+ifeq (,$(findstring <$(MAKECMDGOALS)>,$(NODEPTARGETS)))
-include $(DEPFILES)
+endif
obj32/install:
@$(VECHO) INSTALL32 $(LIBDIR32)