Fix installation of Samba 4 during merged build.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 30 Oct 2008 22:19:51 +0000 (23:19 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 30 Oct 2008 22:19:51 +0000 (23:19 +0100)
source3/samba4.mk
source4/build/make/python.mk
source4/lib/registry/config.mk
source4/scripting/python/config.mk

index e08cbfcfecef33034d513c296a5db18df3f2d012..c3b6af10e42e0444d64585ddb2da9a62819b31a1 100644 (file)
@@ -118,20 +118,21 @@ tallocsrcdir := $(samba4srcdir)/../lib/talloc
 comsrcdir := $(samba4srcdir)/lib/com
 override ASN1C = bin/asn1_compile4
 override ET_COMPILER = bin/compile_et4
+include $(samba4srcdir)/build/make/python.mk
 include samba4-data.mk
 include $(samba4srcdir)/static_deps.mk
-include $(samba4srcdir)/build/make/python.mk
 
 INSTALLPERMS = 0755
+$(foreach SCRIPT,$(wildcard scripting/bin/*),$(eval $(call binary_install_template,$(SCRIPT))))
 
-$(DESTDIR)$(bindir)/%: bin/%4 installdirs
+$(DESTDIR)$(bindir)/%4: bin/%4 installdirs
        @mkdir -p $(@D)
        @echo Installing $(@F) as $@
        @if test -f $@; then rm -f $@.old; mv $@ $@.old; fi
        @cp $< $@
        @chmod $(INSTALLPERMS) $@
 
-$(DESTDIR)$(sbindir)/%: bin/%4 installdirs
+$(DESTDIR)$(sbindir)/%4: bin/%4 installdirs
        @mkdir -p $(@D)
        @echo Installing $(@F) as $@
        @if test -f $@; then rm -f $@.old; mv $@ $@.old; fi
@@ -158,6 +159,8 @@ clean::
 proto:: $(PROTO_HEADERS)
 modules:: $(PLUGINS)
 
+pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
+
 all:: bin/samba4 bin/regpatch4 bin/regdiff4 bin/regshell4 bin/regtree4 bin/smbclient4
 torture:: bin/smbtorture4
 everything:: $(patsubst %,%4,$(BINARIES))
index 66e5def8f0c846e224334a19d9e0febbf5881fab..f9410eec9729120f08127cc8bc8359d69aedd7db 100644 (file)
@@ -46,7 +46,7 @@ swig:: pythonmods
 .SUFFIXES: _wrap.c .i .py
 
 %_wrap.c %.py: %.i
-       [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $<
+       [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -python -keyword $<
 
 realdistclean::
        @echo "Removing SWIG output files"
index fd1fd01a09e8b47b574d29ed696b73da2d34cbb0..2e2b45abe9543c73bed6d6bd2ba81dea703a3a4e 100644 (file)
@@ -109,6 +109,6 @@ PUBLIC_DEPENDENCIES = registry
 
 swig_registry_OBJ_FILES = $(libregistrysrcdir)/registry_wrap.o
 
-$(eval $(call python_py_module_template,samba/registry.py,lib/registry/registry.py))
+$(eval $(call python_py_module_template,samba/registry.py,$(libregistrysrcdir)/registry.py))
 
 $(swig_registry_OBJ_FILES): CFLAGS+=$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)
index 5a44fd5ae692fc3021d9fcbbd92d0c12287b324b..7024684ff92e708e71ae179ebc7594041608e61f 100644 (file)
@@ -25,7 +25,7 @@ $(python_misc_OBJ_FILES): CFLAGS+=$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL
 
 _PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -name "*.py")
 
-$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(pyfile)),$(pyfile))))
+$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(pyfile)),$(pyfile))))
 
 $(eval $(call python_py_module_template,samba/misc.py,$(pyscriptsrcdir)/misc.py))