s3: Another non-gnumake fix
authorVolker Lendecke <vl@samba.org>
Sun, 23 May 2010 09:44:30 +0000 (11:44 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 23 May 2010 10:44:43 +0000 (12:44 +0200)
AC_OUTPUT_COMMANDS must be called before AC_OUTPUT and
$MAKEFILE is not defined in ./config.status

source3/configure.in

index 885b086dcb41b6290419410e0b5852b98ce69f5e..8edb86a4e73bed0c9c3e17e689e0a053ac185f51 100644 (file)
@@ -6759,6 +6759,13 @@ AC_SUBST(SMBD_LIBS)
 CFLAGS="${CFLAGS} \$(FLAGS)"
 CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
 
+# If we had to expand the includes, make tsure the output file is moved back
+AC_OUTPUT_COMMANDS([
+if test -f Makefile-noincludes -a ! -f Makefile -a ! -h Makefile ; then
+       ln -s Makefile-noincludes Makefile
+fi
+])
+
 AC_SUBST(MAKEFILE)
 if test x$samba_cv_gnu_make = xyes; then
        MAKEFILE=Makefile
@@ -6779,12 +6786,6 @@ AC_OUTPUT($MAKEFILE
          pkgconfig/smbsharemodes.pc
          ../examples/libsmbclient/Makefile.internal
          )
-dnl If we had to expand the includes, make tsure the output file is moved back
-AC_OUTPUT_COMMANDS([
-if test x$MAKEFILE != Makefile; then
-       mv $MAKEFILE Makefile
-fi
-])
 
 #################################################
 # Print very concise instructions on building/use