MSVC Builds: Rename testsrules_msvc.mak
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 15 Sep 2015 05:22:41 +0000 (13:22 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 17 Sep 2015 01:34:34 +0000 (09:34 +0800)
...to detectenv-msvc.mak, for better consistency between projects, as that is
used for introspection file builds.

build/Makefile.am
build/atk-introspection-msvc.mak
build/detectenv-msvc.mak [new file with mode: 0644]
build/testsrules_msvc.mak [deleted file]
tests/testatk_vc.mak

index 1c50b667647a4cce3c13c64da306af36a4c00cf8..583966b7ab1032e1268dc3852f4d4f766bbe5662 100644 (file)
@@ -3,7 +3,7 @@ SUBDIRS = \
 
 EXTRA_DIST =   \
        msvcfiles.py    \
-       testsrules_msvc.mak     \
+       detectenv-msvc.mak      \
        introspection-msvc.mak  \
        atk-introspection-msvc.mak      \
        gen-file-list-atk.py
index 05caaa5399c19a9d4f15ddc76cd8e3fe2c95b2c5..0824216d8acaf1ab935f1cf24aed0de9542c6479 100644 (file)
@@ -1,6 +1,6 @@
 # NMake Makefile to build Introspection Files for ATK
 
-!include testsrules_msvc.mak
+!include detectenv-msvc.mak
 
 APIVERSION = 1.0
 
diff --git a/build/detectenv-msvc.mak b/build/detectenv-msvc.mak
new file mode 100644 (file)
index 0000000..06c908e
--- /dev/null
@@ -0,0 +1,72 @@
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
+MSG = ^
+This Makefile is only for Visual Studio 2008 and later.^
+You need to ensure that the Visual Studio Environment is properly set up^
+before running this Makefile.
+!error $(MSG)
+!endif
+
+ERRNUL  = 2>NUL
+_HASH=^#
+
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+    && ![echo PLAT=Win32 >> vercl.x] \
+    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+    && ![echo PLAT=x64 >> vercl.x] \
+    && ![echo $(_HASH)endif >> vercl.x] \
+    && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
+VSVER = 10
+!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
+VSVER = 11
+!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
+VSVER = 12
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 12 (2013).  Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+VALID_CFGSET = TRUE
+!endif
+
+!if "$(CFG)" == "release"
+CFLAGS_ADD = /MD /O2
+!else
+CFLAGS_ADD = /MDd /Od /Zi
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
+
+LD = link.exe
+LD_CFLAGS = /link
+EXEEXT = .exe
+GLIB_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
+
+ATK_API_VERSION = 1.0
diff --git a/build/testsrules_msvc.mak b/build/testsrules_msvc.mak
deleted file mode 100644 (file)
index 06c908e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
-# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
-!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
-MSG = ^
-This Makefile is only for Visual Studio 2008 and later.^
-You need to ensure that the Visual Studio Environment is properly set up^
-before running this Makefile.
-!error $(MSG)
-!endif
-
-ERRNUL  = 2>NUL
-_HASH=^#
-
-!if ![echo VCVERSION=_MSC_VER > vercl.x] \
-    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
-    && ![echo PLAT=Win32 >> vercl.x] \
-    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
-    && ![echo PLAT=x64 >> vercl.x] \
-    && ![echo $(_HASH)endif >> vercl.x] \
-    && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
-!include vercl.i
-!if ![echo VCVER= ^\> vercl.vc] \
-    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
-!include vercl.vc
-!endif
-!endif
-!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
-!endif
-
-!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
-VSVER = 9
-!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
-VSVER = 10
-!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
-VSVER = 11
-!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
-VSVER = 12
-!else
-VSVER = 0
-!endif
-
-!if "$(VSVER)" == "0"
-MSG = ^
-This NMake Makefile set supports Visual Studio^
-9 (2008) through 12 (2013).  Your Visual Studio^
-version is not supported.
-!error $(MSG)
-!endif
-
-VALID_CFGSET = FALSE
-!if "$(CFG)" == "release" || "$(CFG)" == "debug"
-VALID_CFGSET = TRUE
-!endif
-
-!if "$(CFG)" == "release"
-CFLAGS_ADD = /MD /O2
-!else
-CFLAGS_ADD = /MDd /Od /Zi
-!endif
-
-!if "$(PLAT)" == "x64"
-LDFLAGS_ARCH = /machine:x64
-!else
-LDFLAGS_ARCH = /machine:x86
-!endif
-
-LD = link.exe
-LD_CFLAGS = /link
-EXEEXT = .exe
-GLIB_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
-
-ATK_API_VERSION = 1.0
index 1fb1226a15064a8b4da676fdd4ac0c8ba9985e3f..39aeee0c7013c69135a2cfae5f631dd412428b5c 100644 (file)
@@ -1,4 +1,4 @@
-!include ..\build\testsrules_msvc.mak
+!include ..\build\detectenv-msvc.mak
 
 BUILD_PATH = ..\build\win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin
 LDFLAGS_PATH = /libpath:$(BUILD_PATH) /libpath:..\..\vs$(VSVER)\$(PLAT)\lib