Move common rules code to separate directory.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 26 Feb 2008 13:48:11 +0000 (14:48 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 26 Feb 2008 13:48:11 +0000 (14:48 +0100)
(This used to be commit 803ebd6479ae388ae65de8de7fb88600452d47df)

source4/Makefile
source4/build/make/lex_compile.sh [moved from source4/script/lex_compile.sh with 100% similarity]
source4/build/make/rules.mk [moved from source4/rules.mk with 92% similarity]
source4/build/make/yacc_compile.sh [moved from source4/script/yacc_compile.sh with 100% similarity]

index 4bd5042f3c52621155f596f1ef53133f6e398252..3a303ae39f20a09527f3d371eaf49187c8f3bf3f 100644 (file)
@@ -19,6 +19,18 @@ BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
 HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
 HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
 
+$(srcdir)/version.h: $(srcdir)/VERSION
+       @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
+
+regen_version::
+       @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
+
+clean_pch::
+       @echo "Removing precompiled headers"
+       @-rm -f include/includes.h.gch
+
+pch:: clean_pch include/includes.h.gch
+
 .DEFAULT_GOAL := all
 
 ifneq ($(automatic_deps),yes)
similarity index 92%
rename from source4/rules.mk
rename to source4/build/make/rules.mk
index 0d529b7314de6c9e6084bf8fb29af40f080baabb..bd72946593ab34cb514c4dad3138f072271e42e6 100644 (file)
@@ -1,3 +1,6 @@
+# Rules file for Samba 4
+# This relies on GNU make.
+#
 # Dependencies command
 DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
     $(CFLAGS) $(CPPFLAGS) $< -o $@
@@ -26,22 +29,14 @@ PCHCOMPILE = @$(CC) -Ilib/replace \
 # Partial linking
 PARTLINK = @$(PROG_LD) -r
 
+make_utility_dir = $(srcdir)/build/make/
+
 include/config.h:
        @echo "include/config.h not present"
        @echo "You need to rerun ./autogen.sh and ./configure"
        @/bin/false
 
-$(srcdir)/version.h: $(srcdir)/VERSION
-       @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
-
-regen_version::
-       @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
-
-clean_pch::
-       @echo "Removing precompiled headers"
-       @-rm -f include/includes.h.gch
-
-pch:: clean_pch include/includes.h.gch
+pch::
 
 clean:: clean_pch
        @echo Removing objects
@@ -169,11 +164,11 @@ include/includes.d: include/includes.h
 
 .y.c:
        @echo "Building $< with $(YACC)"
-       @-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"
+       @-$(make_utility_dir)/yacc_compile.sh "$(YACC)" "$<" "$@"
 
 .l.c:
        @echo "Building $< with $(LEX)"
-       @-$(srcdir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
+       @-$(make_utility_dir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
 
 %.a:
        @echo Linking $@