win32: Re-organize NMake Makefiles a bit

This way, we can have the introspection NMake Makefiles share more items
with the source generating bits.

Update the Visual Studio projects accordingly
This commit is contained in:
Chun-wei Fan 2021-12-22 16:02:21 +08:00
parent 6671c20632
commit 61dd680b02
6 changed files with 58 additions and 54 deletions

View File

@ -29,14 +29,17 @@ GDK_RESOURCES_ARGS = ..\gdk\gdk.gresource.xml --target=$@ --sourcedir=..\gdk --c
GTK_MARSHALERS_FLAGS = --prefix=_gtk_marshal --valist-marshallers
GTK_RESOURCES_ARGS = ..\gtk\gtk.gresource.xml --target=$@ --sourcedir=..\gtk --c-name _gtk --manual-register
all: \
..\config.h \
GDK_GENERATED_SOURCES = \
..\gdk\gdkconfig.h \
..\gdk\gdkversionmacros.h \
..\gdk\gdkmarshalers.h \
..\gdk\gdkmarshalers.c \
..\gdk\gdkresources.h \
..\gdk\gdkresources.c \
generate-base-sources: \
..\config.h \
$(GDK_GENERATED_SOURCES) \
..\gtk\gtk-win32.rc \
..\gtk\libgtk3.manifest \
..\gtk\gtkdbusgenerated.h \

View File

@ -1,6 +1,7 @@
# NMake Makefile to build Introspection Files for GTK+
!include detectenv-msvc.mak
!include generate-msvc.mak
APIVERSION = 3.0
@ -28,7 +29,7 @@ AT_PLAT=aarch64
AT_PLAT=i686
!endif
all: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
introspect: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
setgirbuildenv:
@set PYTHONPATH=$(PREFIX)\lib\gobject-introspection
@ -38,15 +39,15 @@ setgirbuildenv:
!include introspection.body.mak
install-introspection: all
install-introspection: introspect
@-copy vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir "$(G_IR_INCLUDEDIR)"
@-copy /b vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib "$(G_IR_TYPELIBDIR)"
!else
all:
introspect:
@-echo $(ERROR_MSG)
!endif
clean:
introspect-clean:
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir

View File

@ -68,27 +68,27 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>

View File

@ -121,14 +121,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) generate-base-sources</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) generate-base-sources</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) generate-base-sources</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) generate-base-sources</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean generate-base-sources</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean generate-base-sources</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>

View File

@ -25,9 +25,9 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
@ -38,9 +38,9 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect-clean introspect"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect-clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
@ -53,9 +53,9 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean introspect"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) introspect-clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
@ -66,9 +66,9 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect-clean introspect"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) introspect-clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>

View File

@ -28,8 +28,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -43,8 +43,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -58,8 +58,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -73,8 +73,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -89,8 +89,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -105,8 +105,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -121,8 +121,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
@ -137,8 +137,8 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) generate-base-sources"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean generate-base-sources"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>