Fix build_init vcxproj to correctly detect changes in config.h.
[mono.git] / msvc / winsetup.bat
index f25016fd5f5e872c9e58c95ae6e5779cfb2d8e6d..e6afb26d8ff37979b08de265bda5f08c04d6ce23 100755 (executable)
@@ -12,19 +12,9 @@ SET VERSION_H=..\mono\mini\version.h
 
 ECHO Setting up Mono configuration headers...
 
-IF EXIST %CONFIG_H% (
-       IF NOT EXIST %CYG_CONFIG_H% (
-               ECHO copy %CONFIG_H% %CYG_CONFIG_H%
-               copy %CONFIG_H% %CYG_CONFIG_H%
-       )
-)
-
-IF EXIST %EGLIB_CONFIG_H% (
-       IF NOT EXIST %EGLIB_CYG_CONFIG_H% (
-               ECHO copy %EGLIB_CONFIG_H% %EGLIB_CYG_CONFIG_H%
-               copy %EGLIB_CONFIG_H% %EGLIB_CYG_CONFIG_H%
-       )
-)
+REM Backup existing config.h into cygconfig.h if its not already replaced.
+%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File backup-config-files.ps1 %CONFIG_H% %CYG_CONFIG_H% 2>&1
+%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File backup-config-files.ps1 %EGLIB_CONFIG_H% %EGLIB_CYG_CONFIG_H% 2>&1
 
 %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %WIN_CONFIG_H% %CONFIG_H% %CONFIGURE_AC% 2>&1