Browse Source

Modify NTDS and PassSync to build in the 'built' directory.

Thomas Lackey 20 năm trước cách đây
mục cha
commit
6290f68b69

+ 2 - 2
ldap/servers/ntds/wrapper/Makefile

@@ -80,9 +80,9 @@ layout: $(OBJDEST)
 
 
 $(PRODUCT).msi:	layout
-	$(CP) $(OBJDEST)/* wix
+	$(CP) wix/Binary $(OBJDEST)/
 	# Do not allow MAKEFLAGS or other environment variables to influence nmake.
-	env -i PATH="${PATH}" LIB="${LIB}" INCLUDE="${INCLUDE}" BUILD_DEBUG=${BUILD_DEBUG} build.bat
+	env -i PATH="${PATH}" LIB="${LIB}" INCLUDE="${INCLUDE}" BUILD_DEBUG=${BUILD_DEBUG} OBJDEST=${OBJDEST} build.bat
 	
 clean:
 	$(RM) wix/$(PRODUCT)*.msi wix/ntds.wixobj

+ 6 - 6
ldap/servers/ntds/wrapper/build.bat

@@ -19,19 +19,19 @@ if NOT [%BUILD_DEBUG%] == [] (
 
 set PATH=%PATH%;%CD%\%LIBROOT%\wix
 
+set WXSLOC=%CD%\wix
+echo %WXSLOC%
+
+cd %OBJDEST%
+
 set OK=0
-cd wix
 
-candle ntds.wxs
+candle %WXSLOC%\ntds.wxs
 set /a OK=%OK% + %ERRORLEVEL%
 
 light ntds.wixobj
 set /a OK=%OK% + %ERRORLEVEL%
 
-if NOT [%BUILD_DEBUG%] == [] (
-    if EXIST ntds.msi (move /Y ntds.msi ntds-%BUILD_DEBUG%.msi)
-)
-
 :END
 popd
 if %OK% GTR 1 (set OK=1)

+ 3 - 1
ldap/synctools/Makefile

@@ -44,10 +44,12 @@ BUILD_ROOT = ../../
 include $(BUILD_ROOT)/nsdefs.mk
 include $(BUILD_ROOT)/nsconfig.mk
 
+OBJDEST=../$(OBJDIR)/passsync
+
 all: passsync
 
 passsync:
 ifeq ($(ARCH), WINNT)
 	# Do not allow MAKEFLAGS or other environment variables to influence nmake.
-	cd passwordsync; env -i PATH="${PATH}" LIB="${LIB}" INCLUDE="${INCLUDE}" BUILD_DEBUG=${BUILD_DEBUG} build.bat
+	cd passwordsync; env -i PATH="${PATH}" LIB="${LIB}" INCLUDE="${INCLUDE}" BUILD_DEBUG=${BUILD_DEBUG} OBJDEST=`echo ${OBJDEST} | sed 's/\//\\\\/g'` build.bat
 endif

+ 27 - 21
ldap/synctools/passwordsync/build.bat

@@ -41,6 +41,9 @@
 
 pushd
 
+rem Convert %OBJEST% to absolute.
+call :relative %OBJDEST%
+
 if [%BUILD_DEBUG%] == [optimize] (
     set LIBROOT=..\..\..\..\dist\WINNT5.0_OPT.OBJ
 ) else (
@@ -49,6 +52,8 @@ if [%BUILD_DEBUG%] == [optimize] (
 
 echo %LIBROOT%
 
+set WXSDIR=%CD%\wix
+
 set INCLUDE=%INCLUDE%;%CD%\%LIBROOT%\ldapsdk\include;%CD%\%LIBROOT%\nspr\include;%CD%\%LIBROOT%\nss\include
 set LIB=%LIB%;%CD%\%LIBROOT%\ldapsdk\lib;%CD%\%LIBROOT%\nspr\lib;%CD%\%LIBROOT%\nss\lib
 set PATH=%PATH%;%CD%\%LIBROOT%\wix
@@ -56,67 +61,68 @@ set PATH=%PATH%;%CD%\%LIBROOT%\wix
 set OK=0
 
 cd passsync
+echo Entering %CD%
 
 :BUILD
 nmake passsync.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-copy /Y Debug\passsync.exe ..\Wix
+copy /Y %OBJDEST%\passsync\passsync.exe %OBJDEST%\
 set /a OK=%OK% + %ERRORLEVEL%
 
 cd ..\passhook
+echo Entering %CD%
 
 nmake passhook.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-copy /Y Debug\passhook.dll ..\Wix
+copy /Y %OBJDEST%\passhook\passhook.dll %OBJDEST%\
 set /a OK=%OK% + %ERRORLEVEL%
 
 :PKG
-if NOT EXIST ..\Wix (
-    echo ERROR: Cannot find Wix folder.
-    set OK=1 
-    goto :END )
-
-cd ..\Wix
 
 if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldap32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldap32v50.dll
+    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldap32v50.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldapssl32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldapssl32v50.dll
+    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldapssl32v50.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldappr32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldappr32v50.dll
+    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldappr32v50.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\nspr\lib\libnspr4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libnspr4.dll
+    copy /Y ..\%LIBROOT%\nspr\lib\libnspr4.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\nspr\lib\libplds4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libplds4.dll
+    copy /Y ..\%LIBROOT%\nspr\lib\libplds4.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\nspr\lib\libplc4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libplc4.dll
+    copy /Y ..\%LIBROOT%\nspr\lib\libplc4.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\nss\lib\nss3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\nss3.dll
+    copy /Y ..\%LIBROOT%\nss\lib\nss3.dll %OBJDEST%\
 )
 if EXIST ..\%LIBROOT%\nss\lib\ssl3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\ssl3.dll
+    copy /Y ..\%LIBROOT%\nss\lib\ssl3.dll %OBJDEST%\ 
 )
 if EXIST ..\%LIBROOT%\nss\lib\softokn3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\softokn3.dll
+    copy /Y ..\%LIBROOT%\nss\lib\softokn3.dll %OBJDEST%\
 )
 
-candle PassSync.wxs
+xcopy /E /Y /I %WXSDIR%\Binary %OBJDEST%\Binary 
+
+cd %OBJDEST%
+echo Entering %CD%
+
+candle %WXSDIR%\PassSync.wxs
 set /a OK=%OK% + %ERRORLEVEL%
 
 light PassSync.wixobj
 set /a OK=%OK% + %ERRORLEVEL%
 
-if NOT [%BUILD_DEBUG%] == [] (
-    if EXIST PassSync.msi (move /Y PassSync.msi PassSync-%BUILD_DEBUG%.msi)
-)
+:relative
+set OBJDEST=%~f1
+goto :EOF
 
 :END
 popd

+ 6 - 6
ldap/synctools/passwordsync/passhook/passhook.mak

@@ -65,10 +65,10 @@ NULL=nul
 
 !IF  "$(CFG)" == "passhook - Win32 Release"
 
-OUTDIR=.\Release
-INTDIR=.\Release
+OUTDIR=$(OBJDEST)\passhook
+INTDIR=$(OBJDEST)\passhook
 # Begin Custom Macros
-OutDir=.\Release
+OutDir=$(OBJDEST)\passhook
 # End Custom Macros
 
 ALL : "$(OUTDIR)\passhook.dll"
@@ -140,10 +140,10 @@ LINK32_OBJS= \
 
 !ELSEIF  "$(CFG)" == "passhook - Win32 Debug"
 
-OUTDIR=.\Debug
-INTDIR=.\Debug
+OUTDIR=$(OBJDEST)\passhook
+INTDIR=$(OBJDEST)\passhook
 # Begin Custom Macros
-OutDir=.\Debug
+OutDir=$(OBJDEST)\passhook
 # End Custom Macros
 
 ALL : "$(OUTDIR)\passhook.dll"

+ 6 - 6
ldap/synctools/passwordsync/passsync/passsync.mak

@@ -27,10 +27,10 @@ NULL=nul
 
 !IF  "$(CFG)" == "passsync - Win32 Release"
 
-OUTDIR=.\Release
-INTDIR=.\Release
+OUTDIR=$(OBJDEST)\passsync
+INTDIR=$(OBJDEST)\passsync
 # Begin Custom Macros
-OutDir=.\Release
+OutDir=$(OBJDEST)\passsync
 # End Custom Macros
 
 ALL : "$(OUTDIR)\passsync.exe"
@@ -102,10 +102,10 @@ LINK32_OBJS= \
 
 !ELSEIF  "$(CFG)" == "passsync - Win32 Debug"
 
-OUTDIR=.\Debug
-INTDIR=.\Debug
+OUTDIR=$(OBJDEST)\passsync
+INTDIR=$(OBJDEST)\passsync
 # Begin Custom Macros
-OutDir=.\Debug
+OutDir=$(OBJDEST)\passsync
 # End Custom Macros
 
 ALL : "$(OUTDIR)\passsync.exe"