summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-02-20 15:34:13 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-02-20 15:34:13 +0800
commitda2b1d2380e4da05605498c4259375b822b86eda (patch)
treefe90e4db69c430e5d2342f1d52f841e319a4976b
parent8ab398d23a1606bc4ab5a0888fc2e5190bfa641d (diff)
downloadgobject-introspection-da2b1d2380e4da05605498c4259375b822b86eda.tar.gz
MSVC builds: "Install" test sources like autotools builds
This makes sure that all the test sources that the autotools builds install are "installed" by the Visual Studio builds as well. For doing this, move the generation of everything.[c|h] to gi-introspection-msvc.mak as we need to generate them for all builds, not just during building the tests.
-rw-r--r--win32/gi-introspection-msvc.mak19
-rw-r--r--win32/gi-tests-msvc.mak10
-rw-r--r--win32/vs10/gi-install.propsin12
-rw-r--r--win32/vs9/gi-install.vspropsin12
4 files changed, 43 insertions, 10 deletions
diff --git a/win32/gi-introspection-msvc.mak b/win32/gi-introspection-msvc.mak
index 7a87f197..78ca3958 100644
--- a/win32/gi-introspection-msvc.mak
+++ b/win32/gi-introspection-msvc.mak
@@ -49,8 +49,16 @@ built_install_typelibs = \
Gio-$(GLIB_APIVERSION).typelib \
GIRepository-$(GLIB_APIVERSION).typelib
+generarated_test_srcs = everything.c everything.h
+
!if "$(BUILD_INTROSPECTION)" == "TRUE"
-all: setgirbuildenv $(built_install_girs) $(built_install_typelibs) $(bundled_girs) $(bundled_typelibs) msg_cairo
+all: setgirbuildenv \
+ $(generarated_test_srcs) \
+ $(built_install_girs) \
+ $(built_install_typelibs) \
+ $(bundled_girs) \
+ $(bundled_typelibs) \
+ msg_cairo
!include gi-setenv-msvc.mak
@@ -153,6 +161,14 @@ $(bundled_typelibs): cairo-1.0.gir $(bundled_girs)
@-echo Compiling the bundled $*.gir that came with the GobjectIntrospection package...
@-$(G_IR_COMPILER_CURRENT) --includedir=. --debug --verbose $*.gir -o $@
+# Rules for source code generation
+$(generarated_test_srcs):
+ $(PYTHON) $(G_IR_SCANNER_CURRENT) -I$(TOP_SRCDIR) \
+ --generate-typelib-tests=Everything,everything.h,everything.c \
+ --function-decoration=_GI_TEST_EXTERN \
+ --include-first-in-src=config.h \
+ --include-last-in-header=gitestmacros.h
+
msg_cairo:
@-echo.
@-echo ************* Note ***********************************
@@ -190,5 +206,6 @@ clean:
@-del /f/q gio_list
@-del /f/q gobject_list
@-del /f/q glib_list
+ @-del /f/q $(generarated_test_srcs)
@ if exist __pycache__ rmdir /s /q __pycache__
@-del /f/q *.pyc
diff --git a/win32/gi-tests-msvc.mak b/win32/gi-tests-msvc.mak
index 0b1f59c8..939e3573 100644
--- a/win32/gi-tests-msvc.mak
+++ b/win32/gi-tests-msvc.mak
@@ -255,14 +255,6 @@ warn_tests_log.txt:
@-del $(TOP_SRCDIR)\gir\GObject-$(GLIB_APIVERSION).gir
@-del $(TOP_SRCDIR)\gir\GLib-$(GLIB_APIVERSION).gir
-# Rules for source code generation
-everything.c everything.h:
- $(PYTHON) $(G_IR_SCANNER_CURRENT) -I$(TOP_SRCDIR) \
- --generate-typelib-tests=Everything,everything.h,everything.c \
- --function-decoration=_GI_TEST_EXTERN \
- --include-first-in-src=config.h \
- --include-last-in-header=gitestmacros.h
-
gitestoffsets.c: Offsets-$(GI_APIVERSION).typelib
$(PYTHON) $(TOP_SRCDIR)\tests\offsets\gen-gitestoffsets $(TOP_SRCDIR)\tests\offsets\offsets.h > $@
@@ -295,6 +287,6 @@ clean:
@-for %a in (*.manifest) do @del /f/q %a
@-del /f/q *.pdb
@-del /f/q *.obj
- @-del /f/q everything.c everything.h gitestoffsets.c
+ @-del /f/q gitestoffsets.c
@-del offsets.compiled offsets.introspected
@-del /f/q *.pyc
diff --git a/win32/vs10/gi-install.propsin b/win32/vs10/gi-install.propsin
index 8b8f4313..86e8c197 100644
--- a/win32/vs10/gi-install.propsin
+++ b/win32/vs10/gi-install.propsin
@@ -34,6 +34,18 @@ copy ..\..\tests\gimarshallingtests.c $(CopyDir)\share\gobject-introspection-1.0
copy ..\..\tests\gimarshallingtests.h $(CopyDir)\share\gobject-introspection-1.0\tests
copy ..\..\tests\scanner\regress.c $(CopyDir)\share\gobject-introspection-1.0\tests
copy ..\..\tests\scanner\regress.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\annotation.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\annotation.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\foo.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\foo.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\drawable.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\drawable.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\warnlib.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\warnlib.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\utility.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\..\tests\scanner\utility.h $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\everything.c $(CopyDir)\share\gobject-introspection-1.0\tests
+copy ..\everything.h $(CopyDir)\share\gobject-introspection-1.0\tests
copy $(BinDir)\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner
copy $(BinDir)\_giscanner.pdb $(CopyDir)\lib\gobject-introspection\giscanner
diff --git a/win32/vs9/gi-install.vspropsin b/win32/vs9/gi-install.vspropsin
index 17506954..b8e9df66 100644
--- a/win32/vs9/gi-install.vspropsin
+++ b/win32/vs9/gi-install.vspropsin
@@ -35,6 +35,18 @@ copy ..\..\tests\gimarshallingtests.c $(CopyDir)\share\gobject-introspection-1.0
copy ..\..\tests\gimarshallingtests.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
copy ..\..\tests\scanner\regress.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
copy ..\..\tests\scanner\regress.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\annotation.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\annotation.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\foo.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\foo.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\drawable.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\drawable.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\warnlib.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\warnlib.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\utility.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\..\tests\scanner\utility.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\everything.c $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
+copy ..\everything.h $(CopyDir)\share\gobject-introspection-1.0\tests&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\_giscanner.pdb $(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;