From 0493c5a5004096ab5118920dec16d6be4cf0fdc9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 26 Feb 2008 14:48:11 +0100 Subject: Move common rules code to separate directory. (This used to be commit 803ebd6479ae388ae65de8de7fb88600452d47df) --- source4/build/make/rules.mk | 223 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 source4/build/make/rules.mk (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk new file mode 100644 index 0000000000..bd72946593 --- /dev/null +++ b/source4/build/make/rules.mk @@ -0,0 +1,223 @@ +# Rules file for Samba 4 +# This relies on GNU make. +# +# Dependencies command +DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \ + $(CFLAGS) $(CPPFLAGS) $< -o $@ +# Dependencies for host objects +HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \ + $(HOSTCC_FLAGS) $(CPPFLAGS) $< -o $@ +# Dependencies for precompiled headers +PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \ + $(CFLAGS) $(CPPFLAGS) $< -o $@ + +# Run a static analysis checker +CHECK = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) $(CPPLAGS) -c $< -o $@ + +# Run the configured compiler +COMPILE = $(CC) $(CFLAGS) $(PICFLAG) \ + $(CPPFLAGS) \ + -c $< -o $@ + +# Run the compiler for the build host +HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) $(CPPFLAGS) -c $< -o $@ + +# Precompile headers +PCHCOMPILE = @$(CC) -Ilib/replace \ + $(CFLAGS) $(PICFLAG) $(CPPFLAGS) -c $< -o $@ + +# 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 + +pch:: + +clean:: clean_pch + @echo Removing objects + @-find . -name '*.o' -exec rm -f '{}' \; + @echo Removing hostcc objects + @-find . -name '*.ho' -exec rm -f '{}' \; + @echo Removing binaries + @-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS) + @echo Removing libraries + @-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES) + @-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT) bin/mergedobj/*.o + @echo Removing modules + @-rm -f bin/modules/*/*.$(SHLIBEXT) + @-rm -f bin/*_init_module.c + @echo Removing dummy targets + @-rm -f bin/.*_* + @echo Removing generated files + @-rm -f bin/*_init_module.c + @-rm -rf librpc/gen_* + @echo Removing proto headers + @-rm -f $(PROTO_HEADERS) + +distclean:: clean + -rm -f include/config.h include/config_tmp.h include/build.h + -rm -f data.mk + -rm -f config.status + -rm -f config.log config.cache + -rm -f config.pm config.mk + -rm -f $(PC_FILES) + +removebackup:: + -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~ + +realdistclean:: distclean removebackup + -rm -f include/config_tmp.h.in + -rm -f version.h + -rm -f configure + -rm -f $(MANPAGES) + +check:: test + +unused_macros: + $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort + +############################################################################### +# Templates +############################################################################### + +# Partially link +# Arguments: target object file, source object files +define partial_link_template +$(1): $(2) ; + @echo Partially linking $$@ + @mkdir -p $$(@D) + $$(PARTLINK) -o $$@ $$^ +endef + +# Link a binary +# Arguments: target file, depends, flags +define binary_link_template +$(1): $(2) ; + @echo Linking $$@ + @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) +endef + +# Link a host-machine binary +# Arguments: target file, depends, flags +define host_binary_link_template +$(1): $(2) ; + @echo Linking $$@ + @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3) +endef + +# Create a prototype header +# Arguments: header file, c files +define proto_header_template +$(1): $(2) ; + @echo "Creating $$@" + @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --all=$$@ $$^ +endef + +############################################################################### +# File types +############################################################################### + +.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .$(SHLIBEXT) .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .idl .hd + +.c.d: + @echo "Generating dependencies for $<" + @$(DEPENDS) + +.c.hd: + @echo "Generating host-compiler dependencies for $<" + @$(HDEPENDS) + +include/includes.d: include/includes.h + @echo "Generating dependencies for $<" + @$(PCHDEPENDS) + +.c.o: + @if test -n "$(CC_CHECKER)"; then \ + echo "Checking $< with '$(CC_CHECKER)'"; \ + $(CHECK) ; \ + fi + @echo "Compiling $<" + @-mkdir -p `dirname $@` + @$(COMPILE) && exit 0 ; \ + echo "The following command failed:" 1>&2;\ + $(COMPILE) >/dev/null 2>&1 + + +# echo "$(COMPILE)" 1>&2;\ + +.c.ho: + @echo "Compiling $< with host compiler" + @-mkdir -p `dirname $@` + @$(HCOMPILE) && exit 0;\ + echo "The following command failed:" 1>&2;\ + echo "$(HCOMPILE)" 1>&2;\ + $(HCOMPILE) >/dev/null 2>&1 + +.h.h.gch: + @echo "Precompiling $<" + @$(PCHCOMPILE) + +.y.c: + @echo "Building $< with $(YACC)" + @-$(make_utility_dir)/yacc_compile.sh "$(YACC)" "$<" "$@" + +.l.c: + @echo "Building $< with $(LEX)" + @-$(make_utility_dir)/script/lex_compile.sh "$(LEX)" "$<" "$@" + +%.a: + @echo Linking $@ + @rm -f $@ + @mkdir -p $(@D) + @$(STLD) $(STLD_FLAGS) $@ $^ + + +DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl + +.1.xml.1: + $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $< + +.3.xml.3: + $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $< + +.5.xml.5: + $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $< + +.7.xml.7: + $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $< + +.8.xml.8: + $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $< + +dist:: idl_full manpages configure distclean + +configure: + ./autogen.sh + +showflags:: + @echo 'Samba will be compiled with flags:' + @echo ' CPP = $(CPP)' + @echo ' CPPFLAGS = $(CPPFLAGS)' + @echo ' CC = $(CC)' + @echo ' CFLAGS = $(CFLAGS)' + @echo ' PICFLAG = $(PICFLAG)' + @echo ' BNLD = $(BNLD)' + @echo ' BNLD_FLAGS = $(BNLD_FLAGS)' + @echo ' STLD = $(STLD)' + @echo ' STLD_FLAGS = $(STLD_FLAGS)' + @echo ' SHLD = $(SHLD)' + @echo ' SHLD_FLAGS = $(SHLD_FLAGS)' + @echo ' MDLD = $(MDLD)' + @echo ' MDLD_FLAGS = $(MDLD_FLAGS)' + @echo ' SHLIBEXT = $(SHLIBEXT)' + +etags: + etags `find $(srcdir) -name "*.[ch]"` + +ctags: + ctags `find $(srcdir) -name "*.[ch]"` -- cgit From b3d2a56df29b163d93c4d20efc22c523441a92e5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 26 Feb 2008 17:56:07 +0100 Subject: Fix module aliases. (This used to be commit 584a69acc5ccc0e9be0cb2687578c62bfa1e797d) --- source4/build/make/rules.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index bd72946593..794eed0f66 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -118,6 +118,17 @@ $(1): $(2) ; @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --all=$$@ $$^ endef +# Shared module +# Arguments: Target, dependencies, objects +define shared_module_template + +$(1): $(2) ; + @echo Linking $$@ + @mkdir -p $$(@D) + @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) + +endef + ############################################################################### # File types ############################################################################### -- cgit From cf70b57fadfd8dd31555698308efa648848a79a3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 7 Mar 2008 23:32:16 +0100 Subject: Use GNU make. (This used to be commit 28aff6fafbb3d8796dd6aaac92500254cf50253e) --- source4/build/make/rules.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 44277fe3e2..bce30ffc06 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -136,6 +136,22 @@ $(1): $(2) ; endef +# Shared alias +# Arguments: Target, subsystem name, alias name +define shared_module_alias_template +bin/modules/$(2)/$(3).$$(SHLIBEXT): $(1) + @ln -fs $$( Date: Fri, 7 Mar 2008 23:59:34 +0100 Subject: Use make macro for module installation. (This used to be commit 45d252fd9b3df4f1221a23cece78b673a55dfc7c) --- source4/build/make/rules.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index bce30ffc06..6bb9247df8 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -152,6 +152,17 @@ installplugins:: endef +define shared_module_install_template +installplugins:: bin/modules/$(1)/$(2) + @echo Installing$(2) as $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + @mkdir -p $$(DESTDIR)$$(modulesdir)/$(1)/ + @cp bin/modules/$(1)/$(2) $$(DESTDIR)$$(modulesdir)/$(1)/$(2) +uninstallplugins:: + @echo Uninstalling $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + @-rm $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + +endef + ############################################################################### # File types ############################################################################### -- cgit From 2bf39edc9d0abf3306bd25b9c40d88aceb029be7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 15:28:12 +0100 Subject: Push SOVERSION and VERSION out of perl code. (This used to be commit 0ba8ac6a14c62ff9edfe9f0bf43b8a7406b85291) --- source4/build/make/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 6bb9247df8..d7482fe45c 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -190,10 +190,10 @@ include/includes.d: include/includes.h @-mkdir -p `dirname $@` @$(COMPILE) && exit 0 ; \ echo "The following command failed:" 1>&2;\ + echo "$(COMPILE)" 1>&2;\ $(COMPILE) >/dev/null 2>&1 -# echo "$(COMPILE)" 1>&2;\ .c.ho: @echo "Compiling $< with host compiler" -- cgit From fb6fdfce37a91021c346a52bd7d55a5ee576580a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 17:02:40 +0100 Subject: Fix the build. (This used to be commit f2e49744717eb46bbfafeea9e2eb412a38a142e7) --- source4/build/make/rules.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index d7482fe45c..3c195e2903 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -136,6 +136,24 @@ $(1): $(2) ; endef +# Shared library +# Arguments: Target, dependencies, link flags, soname +define shared_library_template +$(1): $(2) + @echo Linking $$@ + @mkdir -p $$(@D) + @$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \ + $(3) \ + $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(4)) + +ifneq ($(notdir $(1)), $(notdir $(4))) +$(4): $(1) + @echo "Creating symbolic link for $(4)" + @ln -fs $(notdir $(4)) $(1) +endif + +endef + # Shared alias # Arguments: Target, subsystem name, alias name define shared_module_alias_template -- cgit From 3f637016148004e83856466fa90f47015f681ccc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 17:42:46 +0100 Subject: Allow parentheses in commands. (This used to be commit b5c293f05303460aceb8e29a1be68945fac9071a) --- source4/build/make/rules.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 3c195e2903..76ede6eae7 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -207,9 +207,7 @@ include/includes.d: include/includes.h @echo "Compiling $<" @-mkdir -p `dirname $@` @$(COMPILE) && exit 0 ; \ - echo "The following command failed:" 1>&2;\ - echo "$(COMPILE)" 1>&2;\ - $(COMPILE) >/dev/null 2>&1 + $(COMPILE) -- cgit From 7bb0d0b649eab94a3339c9d0f2f704a2eb0a6101 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 19:01:48 +0100 Subject: Remove correct libraries. (This used to be commit 9caa9d85d1ab86bb575a5359d57919b801737a40) --- source4/build/make/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 76ede6eae7..6ea187f376 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -46,7 +46,7 @@ clean:: clean_pch @echo Removing binaries @-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS) @echo Removing libraries - @-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES) + @-rm -f $(STATIC_LIBS) $(SHARED_LIBS) @-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT) bin/mergedobj/*.o @echo Removing modules @-rm -f bin/modules/*/*.$(SHLIBEXT) @@ -167,7 +167,6 @@ uninstallplugins:: installplugins:: @ln -fs $(1) $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT) - endef define shared_module_install_template -- cgit From a4b6992b7023d5b67428739c29aa9948d76fca21 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 9 Mar 2008 00:49:39 +0100 Subject: Move more code out of perl build system. (This used to be commit bfb4d847005567da43e93987add1a7b171b7b192) --- source4/build/make/rules.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 6ea187f376..3c4f4081ea 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -144,14 +144,19 @@ $(1): $(2) @mkdir -p $$(@D) @$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \ $(3) \ - $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(4)) + $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(notdir $(4))) -ifneq ($(notdir $(1)), $(notdir $(4))) +ifneq ($(notdir $(1)),$(notdir $(4))) $(4): $(1) @echo "Creating symbolic link for $(4)" @ln -fs $(notdir $(4)) $(1) endif +ifneq ($(notdir $(1)),$(notdir $(5))) +$(5): $(1) + @echo "Creating symbolic link for $(5)" + @ln -fs $(notdir $(5)) $(1) +endif endef # Shared alias -- cgit From b44dcae6bb201d4c243672d1fd8877ab17d5c636 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 9 Mar 2008 01:22:32 +0100 Subject: Fix the build, symlinks. (This used to be commit c165b34805aa6a82e579afda9f4244c0c68d52b4) --- source4/build/make/rules.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 3c4f4081ea..3ff9f2b933 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -148,14 +148,14 @@ $(1): $(2) ifneq ($(notdir $(1)),$(notdir $(4))) $(4): $(1) - @echo "Creating symbolic link for $(4)" - @ln -fs $(notdir $(4)) $(1) + @echo "Creating symbolic link for $$@" + @ln -fs $$( Date: Fri, 18 Apr 2008 22:20:49 +0200 Subject: build: fix the build rule for .o files metze (This used to be commit c7f34f41c3f9f0c3f75a618dfaf566706014a6b4) --- source4/build/make/rules.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index faefb4e323..541fa018db 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -211,7 +211,9 @@ include/includes.d: include/includes.h @echo "Compiling $<" @-mkdir -p `dirname $@` @$(COMPILE) && exit 0 ; \ - $(COMPILE) + echo "The following command failed:" 1>&2;\ + echo "$(COMPILE)" 1>&2;\ + $(COMPILE) >/dev/null 2>&1 -- cgit From ee70e01e3e4d5f4501dea1b217ff29d978b94548 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 25 Apr 2008 15:08:23 +0100 Subject: Don't compile files twice when the compilation fails. Andrew Bartlett (This used to be commit 53ea233649d12d77233611e272cf5f470177571c) --- source4/build/make/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 541fa018db..8c5b1fe6f3 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -212,8 +212,7 @@ include/includes.d: include/includes.h @-mkdir -p `dirname $@` @$(COMPILE) && exit 0 ; \ echo "The following command failed:" 1>&2;\ - echo "$(COMPILE)" 1>&2;\ - $(COMPILE) >/dev/null 2>&1 + echo "$(COMPILE)" 1>&2 && exit 1 -- cgit From 387c17685c4455bceeea35dd50ce25d593f8892a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 7 May 2008 08:59:06 +0200 Subject: build: fix path to lex_compile.sh metze (This used to be commit 6a1b7f56afa7475880f4eb5f0b669fd2b95a1d8f) --- source4/build/make/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 8c5b1fe6f3..1fc5e23569 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -234,7 +234,7 @@ include/includes.d: include/includes.h .l.c: @echo "Building $< with $(LEX)" - @-$(make_utility_dir)/script/lex_compile.sh "$(LEX)" "$<" "$@" + @-$(make_utility_dir)/lex_compile.sh "$(LEX)" "$<" "$@" %.a: @echo Linking $@ -- cgit From 0b5a16abe03ee582e3d2d7bf41ed5a0f224f95cb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 May 2008 03:01:27 +0200 Subject: Properly escape quotes. (This used to be commit 33094329610097113c244ccd02606661a4c9e2e0) --- source4/build/make/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index f5d57edb0d..a04372b839 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -212,7 +212,7 @@ include/includes.d: include/includes.h @-mkdir -p `dirname $@` @$(COMPILE) && exit 0 ; \ echo "The following command failed:" 1>&2;\ - echo "$(COMPILE)" 1>&2 && exit 1 + echo "$(subst ",\",$(COMPILE))" 1>&2 && exit 1 .c.ho: @@ -220,7 +220,7 @@ include/includes.d: include/includes.h @-mkdir -p `dirname $@` @$(HCOMPILE) && exit 0;\ echo "The following command failed:" 1>&2;\ - echo "$(HCOMPILE)" 1>&2;\ + echo "$(subst ",\",$(HCOMPILE))" 1>&2;\ $(HCOMPILE) >/dev/null 2>&1 .h.h.gch: -- cgit From 67914192c29a0abe98b264c3c9aba8bdb2cae437 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 May 2008 05:18:09 +0200 Subject: Fix formatting of install message. (This used to be commit 371afde9b04694beec4d9e5cb53634315aea86be) --- source4/build/make/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index a04372b839..c0359a8297 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -176,7 +176,7 @@ endef define shared_module_install_template installplugins:: bin/modules/$(1)/$(2) - @echo Installing$(2) as $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + @echo Installing $(2) as $$(DESTDIR)$$(modulesdir)/$(1)/$(2) @mkdir -p $$(DESTDIR)$$(modulesdir)/$(1)/ @cp bin/modules/$(1)/$(2) $$(DESTDIR)$$(modulesdir)/$(1)/$(2) uninstallplugins:: -- cgit From 98154fdf05b725a9b7d7bdcd572a165c3fa865c1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 18 May 2008 18:55:14 +0200 Subject: Move templates to a separate file. (This used to be commit d9770b651f61a0b70d6afa4610fadc7f199e1d98) --- source4/build/make/rules.mk | 97 +-------------------------------------------- 1 file changed, 1 insertion(+), 96 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index c0359a8297..b47cf2d382 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -88,102 +88,7 @@ unused_macros: @mkdir -p $(@D) @$(STLD) $(STLD_FLAGS) $@ $^ -############################################################################### -# Templates -############################################################################### - -# Partially link -# Arguments: target object file, source object files -define partial_link_template -$(1): $(2) ; - @echo Partially linking $$@ - @mkdir -p $$(@D) - $$(PARTLINK) -o $$@ $$^ -endef - -# Link a binary -# Arguments: target file, depends, flags -define binary_link_template -$(1): $(2) ; - @echo Linking $$@ - @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) -endef - -# Link a host-machine binary -# Arguments: target file, depends, flags -define host_binary_link_template -$(1): $(2) ; - @echo Linking $$@ - @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3) -endef - -# Create a prototype header -# Arguments: header file, c files -define proto_header_template -$(1): $(2) ; - @echo "Creating $$@" - @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --public=/dev/null --private=$$@ $$^ -endef - -# Shared module -# Arguments: Target, dependencies, objects -define shared_module_template - -$(1): $(2) ; - @echo Linking $$@ - @mkdir -p $$(@D) - @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) - -endef - -# Shared library -# Arguments: Target, dependencies, link flags, soname -define shared_library_template -$(1): $(2) - @echo Linking $$@ - @mkdir -p $$(@D) - @$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \ - $(3) \ - $$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(notdir $(4))) - -ifneq ($(notdir $(1)),$(notdir $(4))) -$(4): $(1) - @echo "Creating symbolic link for $$@" - @ln -fs $$( Date: Sun, 18 May 2008 23:02:47 +0200 Subject: Fix a couple (well, little more than that..) of typos. (This used to be commit a6b52119940a900fb0de3864b8bca94e2965cc24) --- source4/build/make/rules.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/build/make/rules.mk') diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index b47cf2d382..176e67a691 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -56,8 +56,6 @@ clean:: clean_pch @echo Removing generated files @-rm -f bin/*_init_module.c @-rm -rf librpc/gen_* - @echo Removing proto headers - @-rm -f $(PROTO_HEADERS) distclean:: clean -rm -f include/config.h include/config_tmp.h include/build.h -- cgit