[libpeas/msvc: 7/7] NMake Makefiles: Build the tests



commit 2f42672b4a80cb0610feb1e6a720e75bd48227b5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Oct 17 00:48:22 2018 +0800

    NMake Makefiles: Build the tests
    
    This builds the test programs, and prepares the file layout in order to
    run the tests within the tree.

 win32/Makefile.vc                 |   3 +-
 win32/build-rules-msvc.mak        | 164 ++++++++++++++++++++++++++++++++++++++
 win32/config-msvc.mak             |  25 +++++-
 win32/create-lists-msvc.mak       |  82 +++++++++++++++++++
 win32/generate-msvc.mak           |  21 ++++-
 win32/peas-introspection-msvc.mak |  37 +++++++--
 6 files changed, 320 insertions(+), 12 deletions(-)
---
diff --git a/win32/Makefile.vc b/win32/Makefile.vc
index 8408ca0..da32945 100644
--- a/win32/Makefile.vc
+++ b/win32/Makefile.vc
@@ -18,6 +18,7 @@
 !include ..\peas-demo\peas-demo-srcs.mak
 !include ..\peas-demo\plugins\helloworld\demo-helloworld-srcs.mak
 !include ..\peas-demo\plugins\secondtime\demo-secondtime-srcs.mak
+!include ..\tests\libpeas\introspection\test-introspection-srcs.mak
 
 # Include the Makefile portion that enables features based on user input
 !include config-msvc.mak
@@ -40,8 +41,6 @@ INTROSPECTION_ITEMS =
 
 all: $(PEAS_LIBS) $(PEAS_LOADERS) $(INTROSPECTION_ITEMS) $(PEAS_DEMOS) all-build-info
 
-tests: all $(HB_TESTS)
-
 !include peas-introspection-msvc.mak
 
 # Include the build rules for sources, DLLs and executables
diff --git a/win32/build-rules-msvc.mak b/win32/build-rules-msvc.mak
index 51fdadc..3eebcd7 100644
--- a/win32/build-rules-msvc.mak
+++ b/win32/build-rules-msvc.mak
@@ -81,6 +81,58 @@ $<
 $<
 <<
 
+# Inference rules for the various test sources
+
+{..\tests\testing-util\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) $(TEST_UTIL_CFLAGS) $(TEST_UTIL_DEFINES) 
/Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\libpeas\testing\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) $(TEST_UTIL_CFLAGS) $(TEST_UTIL_DEFINES) 
/I..\tests\libpeas\introspection /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\libpeas\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) $(TEST_UTIL_CFLAGS) /Fo$(CFG)\$(PLAT)\peas-test\ 
/c @<<
+$<
+<<
+
+{..\tests\libpeas\introspection\}.c{$(CFG)\$(PLAT)\peas-test-introspection\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test-introspection\ /c @<<
+$<
+<<
+
+{..\tests\libpeas\plugins\embedded\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\libpeas\plugins\extension-c\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /I..\tests\libpeas\introspection 
/Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\plugins\loadable\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\plugins\has-dep\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{..\tests\plugins\self-dep\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
+{$(CFG)\$(PLAT)\peas-test\}.c{$(CFG)\$(PLAT)\peas-test\}.obj::
+       $(CC) $(CFLAGS) $(PEAS_CFLAGS) $(PEAS_LIB_DEFINES) /Fo$(CFG)\$(PLAT)\peas-test\ /c @<<
+$<
+<<
+
 # Inference rules for building the test programs
 # Used for programs with a single source file.
 # Format is as follows
@@ -98,6 +150,7 @@ $<
 #      @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
 $(CFG)\$(PLAT)\peas-$(APIVERSION).lib: $(PEAS_DLL)
 $(CFG)\$(PLAT)\peas-gtk-$(APIVERSION).lib: $(PEAS_GTK_DLL)
+$(CFG)\$(PLAT)\introspection.lib: $(CFG)\$(PLAT)\introspection.dll
 
 $(PEAS_DLL): config.h $(CFG)\$(PLAT)\peas $(PEAS_MARSHAL_SRCS) $(peas_OBJS)
        link /DLL $(PEAS_LDFLAGS) $(PEAS_DEP_LIBS) -out:$@ -implib:$(CFG)\$(PLAT)\peas-$(APIVERSION).lib @<<
@@ -166,6 +219,77 @@ $(peas_demo_secondtime_OBJS)
        @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
        @-if exist $@.manifest del $@.manifest
 
+$(CFG)\$(PLAT)\introspection.dll:      \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test-introspection \
+$(peas_test_introspection_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_introspection_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libembedded.dll:        \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(peas_test_embedded_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_embedded_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libloadable.dll:        \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(peas_test_loadable_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_loadable_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libhas-dep.dll: \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(peas_test_has_dep_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_has_dep_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libself-dep.dll:        \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(peas_test_self_dep_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_self_dep_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libextension-c.dll:     \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(CFG)\$(PLAT)\Introspection-1.0.typelib       \
+$(peas_test_extension_c_mod_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) $(CFG)\$(PLAT)\introspection.lib -out:$@ @<<
+$(peas_test_extension_c_mod_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\libextension-c-missing-symbol.dll:      \
+$(PEAS_LIBS)   \
+$(CFG)\$(PLAT)\peas-test       \
+$(peas_test_extension_c_missing_symbol_mod_OBJS)
+       link /DLL $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(peas_test_extension_c_missing_symbol_mod_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+       @-if exist $@.manifest del $@.manifest
+
 # Rules for linking EXEs
 # Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
 # $(exe_name_with_path): $(dependent_libs_files_objects_and_items)
@@ -180,7 +304,36 @@ $(peas_demo_OBJS)
        @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
        @-if exist $@.manifest del $@.manifest
 
+$(CFG)\$(PLAT)\engine.exe:     \
+$(CFG)\$(PLAT)\peas-test       \
+$(CFG)\$(PLAT)\Introspection-1.0.typelib       \
+$(TESTS_DLLS)  \
+$(TESTING_UTIL_OBJS)   \
+$(CFG)\$(PLAT)\peas-test\engine.obj
+       link $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) -out:$@ @<<
+$(CFG)\$(PLAT)\peas-test\engine.obj $(TESTING_UTIL_OBJS)
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+       @-if exist $@.manifest del $@.manifest
+
+$(CFG)\$(PLAT)\extension-c.exe:        \
+$(CFG)\$(PLAT)\peas-test       \
+$(CFG)\$(PLAT)\Introspection-1.0.typelib       \
+$(TESTS_DLLS)  \
+$(TESTING_EXT_UTIL_OBJS)       \
+$(CFG)\$(PLAT)\libembedded.dll \
+$(CFG)\$(PLAT)\peas-test\extension-c.obj
+       link $(PEAS_LDFLAGS) $(PEAS_LIBS) $(PEAS_DEP_LIBS) $(CFG)\$(PLAT)\introspection.lib -out:$@ @<<
+$(CFG)\$(PLAT)\peas-test\extension-c.obj $(TESTING_EXT_UTIL_OBJS) 
$(CFG)\$(PLAT)\peas-test\embedded-resources.obj $(CFG)\$(PLAT)\libembedded.lib
+<<
+       @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+       @-if exist $@.manifest del $@.manifest
+
 clean:
+       @for %%d in (has-dep loadable self-dep) do @(for %%x in (dll pdb) do @if exist 
..\tests\plugins\%%d\lib%%d.%%x del /f /q ..\tests\plugins\%%d\lib%%d.%%x)
+       @for %%d in (embedded extension-c) do @(for %%x in (dll pdb) do @if exist 
..\tests\libpeas\plugins\%%d\lib%%d.%%x del /f /q ..\tests\libpeas\plugins\%%d\lib%%d.%%x)
+       @for %%x in (dll pdb) do @if exist 
..\tests\libpeas\plugins\extension-c\libextension-c-missing-symbol.%%x del /f /q 
..\tests\libpeas\plugins\extension-c\libextension-c-missing-symbol.%%x
+       @if exist ..\tests\libpeas\introspection\Introspection-1.0.typelib del /f /q 
..\tests\libpeas\introspection\Introspection-1.0.typelib
        @for %%x in (dll pdb) do @if exist ..\loaders\python3\libpython3loader.%%x del /f /q 
..\loaders\python3\libpython3loader.%%x
        @for %%x in (dll pdb) do @if exist ..\loaders\lua5.1\liblua51loader.%%x del /f /q  
..\loaders\lua5.1\liblua51loader.%%x
        @for %%x in (dll pdb) do @if exist ..\peas-demo\plugins\helloworld\libhelloworld.%%x del /f /q 
..\peas-demo\plugins\helloworld\libhelloworld.%%x
@@ -199,6 +352,9 @@ clean:
        @-del /f /q $(CFG)\$(PLAT)\*.lib
        @-del /f /q $(CFG)\$(PLAT)\*.exp
        @for %%f in ($(CFG)\$(PLAT)\*.ilk) do @del /f /q $(CFG)\$(PLAT)\%%f
+       @if exist $(CFG)\$(PLAT)\peas-test-introspection\ del /f /q 
$(CFG)\$(PLAT)\peas-test-introspection\*.obj
+       @if exist $(CFG)\$(PLAT)\peas-test\ del /f /q $(CFG)\$(PLAT)\peas-test\*.obj
+       @for %%x in (c h) do @(if exist $(CFG)\$(PLAT)\peas-test\embedded-resources.%%x del /f /q 
$(CFG)\$(PLAT)\peas-test\embedded-resources.%%x)
        @if exist $(CFG)\$(PLAT)\peas-demo-secondtime\ del /f /q $(CFG)\$(PLAT)\peas-demo-secondtime\*.obj
        @if exist $(CFG)\$(PLAT)\peas-demo-helloworld\ del /f /q $(CFG)\$(PLAT)\peas-demo-helloworld\*.obj
        @if exist $(CFG)\$(PLAT)\peas-demo\ del /f /q $(CFG)\$(PLAT)\peas-demo\*.obj
@@ -211,6 +367,8 @@ clean:
        @if exist $(CFG)\$(PLAT)\peas-gtk\ del /f /q $(CFG)\$(PLAT)\peas-gtk\*.obj
        @-del /f /q $(CFG)\$(PLAT)\peas\*.obj
        @-del /f /q $(PEAS_MARSHAL_SRCS)
+       @if exist $(CFG)\$(PLAT)\peas-test-introspection\ rmdir /s /q $(CFG)\$(PLAT)\peas-test-introspection
+       @if exist $(CFG)\$(PLAT)\peas-test\ rmdir /s /q $(CFG)\$(PLAT)\peas-test
        @if exist $(CFG)\$(PLAT)\peas-demo-secondtime\ rmdir /s /q $(CFG)\$(PLAT)\peas-demo-secondtime
        @if exist $(CFG)\$(PLAT)\peas-demo-helloworld\ rmdir /s /q $(CFG)\$(PLAT)\peas-demo-helloworld
        @if exist $(CFG)\$(PLAT)\peas-demo\ rmdir /s /q $(CFG)\$(PLAT)\peas-demo
@@ -242,6 +400,12 @@ install:
        @if exist $(CFG)\$(PLAT)\PeasGtk-$(APIVERSION).gir (copy /y $(CFG)\$(PLAT)\PeasGtk-$(APIVERSION).gir 
$(PREFIX)\share\gir-1.0\)
        @if exist $(CFG)\$(PLAT)\PeasGtk-$(APIVERSION).typelib (copy /y 
$(CFG)\$(PLAT)\PeasGtk-$(APIVERSION).typelib $(PREFIX)\lib\girepository-1.0\)
 
+tests: $(TEST_PROGS)
+       @copy /b $(CFG)\$(PLAT)\Introspection-1.0.typelib ..\tests\libpeas\introspection
+       @for %%d in (has-dep loadable self-dep) do @(for %%x in (dll pdb) do @copy /b 
$(CFG)\$(PLAT)\lib%%d.%%x ..\tests\plugins\%%d\)
+       @for %%d in (embedded extension-c) do @(for %%x in (dll pdb) do @copy /b $(CFG)\$(PLAT)\lib%d.%x 
..\tests\libpeas\plugins\%d\)
+       @for %%x in (dll pdb) do @if exist $(CFG)\$(PLAT)\libextension-c-missing-symbol.%%x copy 
$(CFG)\$(PLAT)\libextension-c-missing-symbol.%%x ..\tests\libpeas\plugins\extension-c
+
 prep-run-demo:
        @if not exist $(CFG)\$(PLAT)\peas-demo.exe (echo peas-demo is not built yet!) & (goto :eof)
        @for %%x in (exe pdb) do @copy /b /y $(CFG)\$(PLAT)\peas-demo.%%x ..\peas-demo
diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
index 97b4b45..edcad40 100644
--- a/win32/config-msvc.mak
+++ b/win32/config-msvc.mak
@@ -144,4 +144,27 @@ LUA_CFLAGS = $(PEAS_DEFINES) $(PEAS_CFLAGS)
 !if "$(LUA_EXTRA_CFLAGS)" != ""
 LUA_CFLAGS = $(LUA_EXTRA_CFLAGS) $(LUA_CFLAGS)
 !endif
-!endif
\ No newline at end of file
+!endif
+
+TESTS_DLLS =   \
+       $(CFG)\$(PLAT)\libembedded.dll  \
+       $(CFG)\$(PLAT)\libloadable.dll  \
+       $(CFG)\$(PLAT)\libhas-dep.dll   \
+       $(CFG)\$(PLAT)\libself-dep.dll  \
+       $(CFG)\$(PLAT)\libextension-c.dll       \
+       $(CFG)\$(PLAT)\libextension-c-missing-symbol.dll
+
+TEST_PROGS =   \
+       $(CFG)\$(PLAT)\engine.exe       \
+       $(CFG)\$(PLAT)\extension-c.exe
+
+TESTING_UTIL_OBJS =    \
+       $(CFG)\$(PLAT)\peas-test\testing-util.obj       \
+       $(CFG)\$(PLAT)\peas-test\testing.obj
+
+TESTING_EXT_UTIL_OBJS =        \
+       $(TESTING_UTIL_OBJS)    \
+       $(CFG)\$(PLAT)\peas-test\testing-extension.obj
+
+TEST_UTIL_DEFINES = /DSRCDIR=\"$(PEAS_BUILDDIR)\" /DBUILDDIR=\"$(PEAS_BUILDDIR)\"
+TEST_UTIL_CFLAGS = /I..\tests\testing-util /I..\tests\libpeas\testing
\ No newline at end of file
diff --git a/win32/create-lists-msvc.mak b/win32/create-lists-msvc.mak
index b0a80b8..7512e8f 100644
--- a/win32/create-lists-msvc.mak
+++ b/win32/create-lists-msvc.mak
@@ -135,6 +135,88 @@ NULL=
 !if [call create-lists.bat footer peas_objs.mak]
 !endif
 
+# For introspection test
+!if [call create-lists.bat header peas_objs.mak peas_test_introspection_OBJS]
+!endif
+
+!if [for %c in ($(PEAS_TEST_INTROSPECTION_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file 
peas_objs.mak ^$(CFG)\^$(PLAT)\peas-test-introspection\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_introspection_sources]
+!endif
+
+!if [for %c in ($(PEAS_TEST_INTROSPECTION_SRCS)) do @call create-lists.bat file peas_objs.mak 
..\tests\libpeas\introspection\%c]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak embedded_plugins]
+!endif
+
+!if [for %p in (..\tests\libpeas\plugins\embedded\*.plugin) do @call create-lists.bat file peas_objs.mak %p]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_embedded_OBJS]
+!endif
+
+!if [for %c in (embedded-plugin.c embedded-resources.c) do @call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_loadable_OBJS]
+!endif
+
+!if [for %c in (..\tests\plugins\loadable\*.c) do @call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_has_dep_OBJS]
+!endif
+
+!if [for %c in (..\tests\plugins\has-dep\*.c) do @call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_self_dep_OBJS]
+!endif
+
+!if [for %c in (..\tests\plugins\self-dep\*.c) do @call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_extension_c_mod_OBJS]
+!endif
+
+!if [for %c in (..\tests\libpeas\plugins\extension-c\*.c) do @if not "%~nc" == 
"extension-c-missing-symbol-plugin" call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
+!if [call create-lists.bat header peas_objs.mak peas_test_extension_c_missing_symbol_mod_OBJS]
+!endif
+
+!if [for %c in (..\tests\libpeas\plugins\extension-c\*.c) do @if "%~nc" == 
"extension-c-missing-symbol-plugin" call create-lists.bat file peas_objs.mak 
^$(CFG)\^$(PLAT)\peas-test\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer peas_objs.mak]
+!endif
+
 !include peas_objs.mak
 
 !if [del /f /q peas_objs.mak]
diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak
index 1641005..f62ec12 100644
--- a/win32/generate-msvc.mak
+++ b/win32/generate-msvc.mak
@@ -47,6 +47,23 @@ $(CFG)\$(PLAT)\loaders-lua\peas-lua-resources.c:     \
        --internal                      \
        $**
 
+..\tests\libpeas\plugins\embedded\embedded.gresource.xml: $(embedded_plugins)
+
+embedded_resource_sources =    \
+       $(CFG)\$(PLAT)\peas-test\embedded-resources.h   \
+       $(CFG)\$(PLAT)\peas-test\embedded-resources.c
+
+$(CFG)\$(PLAT)\peas-test\embedded-resources.h  \
+$(CFG)\$(PLAT)\peas-test\embedded-resources.c: ..\tests\libpeas\plugins\embedded\embedded.gresource.xml
+       $(PREFIX)\bin\glib-compile-resources.exe        \
+       --target=$@                     \
+       --sourcedir=$(**D)      \
+       --generate      \
+       --c-name="embedded"     \
+       --manual-register       \
+       --internal                      \
+       $**
+
 # Create the build directories
 
 $(CFG)\$(PLAT)\peas    \
@@ -56,5 +73,7 @@ $(CFG)\$(PLAT)\loaders-py3    \
 $(CFG)\$(PLAT)\loaders-lua     \
 $(CFG)\$(PLAT)\peas-demo       \
 $(CFG)\$(PLAT)\peas-demo-helloworld    \
-$(CFG)\$(PLAT)\peas-demo-secondtime:
+$(CFG)\$(PLAT)\peas-demo-secondtime    \
+$(CFG)\$(PLAT)\peas-test-introspection \
+$(CFG)\$(PLAT)\peas-test:
        @-mkdir $@
\ No newline at end of file
diff --git a/win32/peas-introspection-msvc.mak b/win32/peas-introspection-msvc.mak
index ddb292e..35e86b6 100644
--- a/win32/peas-introspection-msvc.mak
+++ b/win32/peas-introspection-msvc.mak
@@ -39,13 +39,6 @@ $(CFG)/$(PLAT)/Peas-$(APIVERSION).gir: $(peas_introspection_sources) $(PEAS_DLL)
        -L $(CFG)\$(PLAT)       \
        -o $@
 
-$(CFG)/$(PLAT)/Peas-$(APIVERSION).typelib: $(CFG)/$(PLAT)/Peas-$(APIVERSION).gir
-       @-echo Compiling $@...
-       $(G_IR_COMPILER)        \
-       --includedir=$(CFG)/$(PLAT)/Peas-$(APIVERSION).gir --debug --verbose    \
-       $**     \
-       -o $@
-
 $(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).gir: $(peas_introspection_sources) $(PEAS_DLL) 
$(CFG)/$(PLAT)/Peas-$(APIVERSION).gir
        @-echo Generating $@...
        $(PYTHON) $(G_IR_SCANNER)       \
@@ -66,7 +59,35 @@ $(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).gir: $(peas_introspection_sources) $(PEAS_D
        -L $(CFG)\$(PLAT)       \
        -o $@
 
-$(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).typelib: $(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).gir
+$(CFG)/$(PLAT)/Introspection-1.0.gir: $(peas_test_introspection_sources) $(CFG)/$(PLAT)/introspection.lib 
$(CFG)/$(PLAT)/Peas-$(APIVERSION).gir
+       @-echo Generating $@...
+       $(PYTHON) $(G_IR_SCANNER)       \
+       --verbose -no-libtool   \
+       --namespace=Introspection       \
+       --nsversion=1.0 \
+               \
+       --library=introspection --library=peas-1.0      \
+               \
+       --add-include-path=$(G_IR_INCLUDEDIR)   \
+       --include=GObject-2.0   \
+       --pkg-export=libpeas-1.0        \
+       --cflags-begin  \
+       $(PEAS_CFLAGS)  \
+       --cflags-end    \
+       --warn-all      \
+       $(peas_test_introspection_sources)      \
+       -L $(CFG)\$(PLAT)       \
+       -o $@
+
+$(CFG)/$(PLAT)/Peas-$(APIVERSION).typelib: $(CFG)/$(PLAT)/Peas-$(APIVERSION).gir
+       @-echo Compiling $@...
+       $(G_IR_COMPILER)        \
+       --debug --verbose       \
+       $**     \
+       -o $@
+
+$(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).typelib: $(CFG)/$(PLAT)/PeasGtk-$(APIVERSION).gir 
$(CFG)/$(PLAT)/Peas-$(APIVERSION).typelib
+$(CFG)/$(PLAT)/Introspection-1.0.typelib: $(CFG)/$(PLAT)/Introspection-1.0.gir 
$(CFG)/$(PLAT)/Peas-$(APIVERSION).typelib
        @-echo Compiling $@...
        $(G_IR_COMPILER)        \
        --includedir=$(CFG)/$(PLAT) --debug --verbose   \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]