Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
[kai/samba-autobuild/.git] / source4 / build / make / rules.mk
index 3c195e290361652fd64b39ecd816b41897e676a5..078f5d9295b007ebc1382aae695658e48a232b46 100644 (file)
@@ -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)
@@ -122,7 +122,7 @@ endef
 define proto_header_template
 $(1): $(2) ;
        @echo "Creating $$@"
-       @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --all=$$@ $$^
+       @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --public=/dev/null --private=$$@ $$^
 endef
 
 # Shared module
@@ -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)
+       @echo "Creating symbolic link for $$@"
+       @ln -fs $$(<F) $$@
 endif
 
+ifneq ($(notdir $(1)),$(notdir $(5)))
+$(5): $(1)
+       @echo "Creating symbolic link for $$@"
+       @ln -fs $$(<F) $$@
+endif
 endef
 
 # Shared alias
@@ -167,7 +172,6 @@ uninstallplugins::
 installplugins::
        @ln -fs $(1) $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT)
 
-
 endef
 
 define shared_module_install_template
@@ -212,7 +216,6 @@ include/includes.d: include/includes.h
                $(COMPILE) >/dev/null 2>&1
 
 
-
 .c.ho:
        @echo "Compiling $< with host compiler"
        @-mkdir -p `dirname $@`