$(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV):
@echo Recreating build dirs
@if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
+ @cd $(BUILD_DIR)
@for %D in ($(BUILD_DIRS_SUB)) do @if not exist %D @mkdir %D > NUL
@if not exist $(BUILD_DIR_DEV) @mkdir $(BUILD_DIR_DEV) > NUL
+ @cd $(PHP_SRC_DIR)
+
clean-sapi:
@echo Cleaning SAPI
clean: clean-sapi
@echo Cleaning distribution build dirs
+ @cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
+ @cd $(PHP_SRC_DIR)
-@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL
-rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
clean-all:
@echo Cleaning standard build dirs
+ @cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
+ @cd $(PHP_SRC_DIR)
-@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL
test:
cd ..\..
dist: all build-dist
-snap: build-devel build-lib build-snap build-dist
+snap: build-snap build-devel build-dist
$(BUILD_DIR)\deplister.exe: win32\build\deplister.c
$(PHP_CL) /Fo$(BUILD_DIR)\ /Fd$(BUILD_DIR)\ /Fp$(BUILD_DIR)\ /FR$(BUILD_DIR) /Fe$(BUILD_DIR)\deplister.exe win32\build\deplister.c imagehlp.lib
@echo Registering event source with syslog (requires admin rights)
@echo It's okay for this step to fail:
-$(PHP_PREFIX)\php.exe -n -dextension_dir=$(PHP_PREFIX) win32/build/registersyslog.php $(PHP_PREFIX)\$(PHPDLL)
+
var SYSTEM_DRIVE = WshShell.Environment("Process").Item("SystemDrive");\r
var PROGRAM_FILES = WshShell.Environment("Process").Item("ProgramFiles");\r
var DSP_FLAGS = new Array();\r
+var PHP_SRC_DIR=FSO.GetParentFolderName(WScript.ScriptFullName);\r
\r
/* Store the enabled extensions (summary + QA check) */\r
var extensions_enabled = new Array();\r
continue;\r
}\r
last = bd;\r
- ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp('^'+dir+'\\\\'), '$(BUILD_DIR)\\'));\r
+\r
+ build_dir = get_define('BUILD_DIR');\r
+ build_dir = build_dir.replace(new RegExp("\\\\", "g"), "\\\\");\r
+ if (build_dir.substr(build_dir.Length - 2, 2) != '\\\\') {\r
+ build_dir += '\\\\';\r
+ }\r
+ ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp(build_dir), ''));\r
+\r
if (!FSO.FolderExists(bd)) {\r
FSO.CreateFolder(bd);\r
}\r
/* spit out variable definitions */\r
var keys = (new VBArray(configure_subst.Keys())).toArray();\r
var i;\r
-\r
+ MF.WriteLine("PHP_SRC_DIR =" + PHP_SRC_DIR);\r
for (i in keys) {\r
// The trailing space is needed to prevent the trailing backslash\r
// that is part of the build dir flags (CFLAGS_BD_XXX) from being\r