summaryrefslogtreecommitdiff
path: root/source4/Makefile
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 18:05:47 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 18:05:47 +0100
commit943f61be400c332f583d87da7ef96ca7f8cbb306 (patch)
tree7faab287f7aa9f09a6e639f5df38cbc12e4dd95f /source4/Makefile
parent738fd7fd504c3412128cfae4f8f59ac4f212ae0f (diff)
downloadsamba-943f61be400c332f583d87da7ef96ca7f8cbb306.tar.gz
samba-943f61be400c332f583d87da7ef96ca7f8cbb306.tar.bz2
samba-943f61be400c332f583d87da7ef96ca7f8cbb306.zip
Move automatic dependencies code out of perl code.
(This used to be commit 9e9d98d75d52846bca88ec7d12b91b140b069868)
Diffstat (limited to 'source4/Makefile')
-rw-r--r--source4/Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/source4/Makefile b/source4/Makefile
index f9a753eb67..75c1c6db35 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -19,12 +19,40 @@ BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
-default: all
+.DEFAULT_GOAL := all
+
+ifneq ($(automatic_deps),yes)
+ALL_PREDEP = proto
+.NOTPARALLEL:
+endif
include rules.mk
include data.mk
include extra_cflags.txt
+DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
+ include/includes.d
+
+ifeq ($(automatic_deps),yes)
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(MAKECMDGOALS),realdistclean)
+ifneq ($(SKIP_DEP_FILES),yes)
+-include $(DEP_FILES)
+endif
+endif
+endif
+endif
+
+ifneq ($(SKIP_DEP_FILES),yes)
+clean::
+ @echo Removing dependency files
+ @find . -name '*.d' -o -name '*.hd' | xargs rm -f
+endif
+else
+include $(srcdir)/static_deps.mk
+endif
+
DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
$(srcdir)/version.h