use gmake to handle .py file copies.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 16 Feb 2008 15:15:21 +0000 (16:15 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 29 Feb 2008 12:42:59 +0000 (13:42 +0100)
(This used to be commit d54421a9eeadbd76791917c5e3c460c897259ede)

source4/build/smb_build/makefile.pm
source4/scripting/python/config.mk

index 29da771353b1b9f0d0cc3e97f9ab9d5e54b1fa93..fa2d7883eb446f5de4cda462500349d6a063e7c8 100644 (file)
@@ -341,9 +341,7 @@ sub PythonFiles($$)
        foreach (@{$ctx->{PYTHON_FILES}}) {
                my $target = "bin/python/".basename($_);
                my $source = output::add_dir_str($ctx->{BASEDIR}, $_);
-               $self->output("$target: $source\n" .
-                                         "\tmkdir -p \$(builddir)/bin/python\n" .
-                             "\tcp $source \$@\n\n");
+               $self->output("$target: $source\n\n");
                push (@{$self->{python_pys}}, $target);
        }
 }
index 0d47c8c5427a592d1679414000ef70729ab1788f..b68abdba5e4df0238b8e3b33cea6746bdbd49144 100644 (file)
@@ -35,6 +35,10 @@ PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py
 pydoctor:: pythonmods
        LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --project-name=Samba --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES))
 
+bin/python/%.py: 
+       mkdir -p $(@D)
+       cp $< $@
+
 installpython:: pythonmods
        @$(SHELL) $(srcdir)/script/installpython.sh \
                $(INSTALLPERMS) \