Fix installation of Samba4 into an empty tree.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 27 Jun 2008 02:56:20 +0000 (12:56 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 27 Jun 2008 02:56:20 +0000 (12:56 +1000)
Jelmer's previous patch failed because sh is very fussy about it's
syntax, but only compaled in this case if you take the 'no existing
binary' path.

Andrew Bartlett
(This used to be commit 9cb5327ac9811b3c1309d0e4082da3f54ab2a050)

source4/Makefile

index 3c2efe35af0085829651bc32721aa3d9caa6ac7e..e43ccf77317eba94c2cdfbdbb54885626246e13e 100644 (file)
@@ -249,14 +249,14 @@ uninstallmisc::
 $(DESTDIR)$(bindir)/%: bin/% installdirs
        @mkdir -p $(@D)
        @echo Installing $(@F) as $@
-       @if test -f $@; then; rm -f $@.old; mv $@ $@.old; fi
+       @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
        @cp $< $@
        @chmod $(INSTALLPERMS) $@
 
 $(DESTDIR)$(sbindir)/%: bin/% installdirs
        @mkdir -p $(@D)
        @echo Installing $(@F) as $@
-       @if test -f $@; then; rm -f $@.old; mv $@ $@.old; fi
+       @if test -f $@; then echo -n ""; rm -f $@.old; mv $@ $@.old; fi
        @cp $< $@
        @chmod $(INSTALLPERMS) $@