summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-07-30 14:35:16 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-09-25 23:40:50 +0800
commitc34741e73e237501156cb0dd536fbef46c84adfa (patch)
tree668ac172303927ad2045bd778ca6233ab1fd3871
parent6031a99b39c58e0311bf042cee634826bde2845c (diff)
downloadgobject-introspection-c34741e73e237501156cb0dd536fbef46c84adfa.tar.gz
Clean Up Visual Studio Project Generation
This makes use of the common autotools modules that was just added so that there would need to be less items in g-i's main Makefile-msvcproj.am, so that we can generate the complete Visual Studio 2008/2010 project files (which will then be used to obtain the Visual Studio 2012 and 2013 projects) and the property sheets to "install" the built binaries and headers.
-rw-r--r--Makefile-msvcproj.am208
-rw-r--r--build/win32/vs10/Makefile.am20
-rw-r--r--build/win32/vs10/gi-install.propsin4
-rw-r--r--build/win32/vs9/Makefile.am21
-rw-r--r--build/win32/vs9/gi-install.vspropsin5
5 files changed, 79 insertions, 179 deletions
diff --git a/Makefile-msvcproj.am b/Makefile-msvcproj.am
index cdfbd486..374dc144 100644
--- a/Makefile-msvcproj.am
+++ b/Makefile-msvcproj.am
@@ -1,131 +1,38 @@
# This is to fill in Visual C++ projects for projects which add/remove
# sources from them every now and then.
-# --------------------------
-# cmph (static lib) projects
-# --------------------------
-./build/win32/vs9/cmph.vcproj: $(top_srcdir)/build/win32/vs9/cmph.vcprojin
- for F in `echo $(libcmph_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <File RelativePath="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >cmph.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/cmph.vcprojin >$@
- rm cmph.sourcefiles
-
-./build/win32/vs10/cmph.vcxproj: $(top_srcdir)/build/win32/vs10/cmph.vcxprojin
- for F in `echo $(libcmph_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >cmph.vs10.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/cmph.vcxprojin >$@
- rm cmph.vs10.sourcefiles
-
-./build/win32/vs10/cmph.vcxproj.filters: $(top_srcdir)/build/win32/vs10/cmph.vcxproj.filtersin
- for F in `echo $(libcmph_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'"><Filter>Sources</Filter></ClCompile>' \
- ;; \
- esac; \
- done >cmph.vs10.sourcefiles.filters
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/cmph.vcxproj.filtersin >$@
- rm cmph.vs10.sourcefiles.filters
+MSVCPROJS = cmph girepository g-ir-compiler
+
+cmph_FILES = $(libcmph_la_SOURCES)
+cmph_EXCLUDES = dummy
+
+girepository_FILES = $(libgirepository_1_0_la_SOURCES) $(libgirepository_gthash_la_SOURCES)
+girepository_EXCLUDES = gidummy
+girepository_HEADERS_DIR = $(includedir)/gobject-introspection-1.0
+girepository_HEADERS_INST = $(girepo_HEADERS)
+girepository_HEADERS_EXCLUDES = gidummy
+
+g_ir_compiler_FILES = $(libgirepository_gthash_la_SOURCES) $(libgirepository_internals_la_SOURCES)
+g_ir_compiler_EXCLUDES = gidummy
+
+$(top_builddir)/build/win32/vs9/giscanner.scripts:
+ echo '' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\collections&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Gjs&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Python&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+ echo '' >>$(top_builddir)/build/win32/vs9/giscanner.scripts
+
+ echo '' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\collections' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Gjs' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
+ echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Python' >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
-# -------------------------
-# girepository DLL projects
-# -------------------------
-./build/win32/vs9/girepository.vcproj: $(top_srcdir)/build/win32/vs9/girepository.vcprojin ./build/win32/vs9/gir.vs9.install
- for F in `echo $(libgirepository_1_0_la_SOURCES) $(libgirepository_gthash_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <File RelativePath="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >girepository.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/girepository.vcprojin >$@
- rm girepository.sourcefiles
-
-./build/win32/vs10/girepository.vcxproj: $(top_srcdir)/build/win32/vs10/girepository.vcxprojin ./build/win32/vs10/gir.vs10.install
- for F in `echo $(libgirepository_1_0_la_SOURCES) $(libgirepository_gthash_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >girepository.vs10.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/girepository.vcxprojin >$@
- rm girepository.vs10.sourcefiles
-
-./build/win32/vs10/girepository.vcxproj.filters: $(top_srcdir)/build/win32/vs10/girepository.vcxproj.filtersin
- for F in `echo $(libgirepository_1_0_la_SOURCES) $(libgirepository_gthash_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'"><Filter>Sources</Filter></ClCompile>' \
- ;; \
- esac; \
- done >girepository.vs10.sourcefiles.filters
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/girepository.vcxproj.filtersin >$@
- rm girepository.vs10.sourcefiles.filters
-
-# ------------------------------------
-# g-ir-compiler.exe projects
-# (We integrate the
-# libgirepository_internals_la_SOURCES
-# and
-# libgirepository_gthash_la_SOURCES
-# here)
-# ------------------------------------
-./build/win32/vs9/g-ir-compiler.vcproj: $(top_srcdir)/build/win32/vs9/g-ir-compiler.vcprojin
- for F in `echo $(libgirepository_gthash_la_SOURCES) $(libgirepository_internals_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <File RelativePath="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >g-ir-compiler.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/g-ir-compiler.vcprojin >$@
- rm g-ir-compiler.sourcefiles
-
-./build/win32/vs10/g-ir-compiler.vcxproj: $(top_srcdir)/build/win32/vs10/g-ir-compiler.vcxprojin
- for F in `echo $(libgirepository_gthash_la_SOURCES) $(libgirepository_internals_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'" />' \
- ;; \
- esac; \
- done >g-ir-compiler.vs10.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/g-ir-compiler.vcxprojin >$@
- rm g-ir-compiler.vs10.sourcefiles
-
-./build/win32/vs10/g-ir-compiler.vcxproj.filters: $(top_srcdir)/build/win32/vs10/g-ir-compiler.vcxproj.filtersin
- for F in `echo $(libgirepository_gthash_la_SOURCES) $(libgirepository_internals_la_SOURCES) | tr '/' '\\\\'`; do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\'$$F'"><Filter>Sources</Filter></ClCompile>' \
- ;; \
- esac; \
- done >g-ir-compiler.vs10.sourcefiles.filters
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/g-ir-compiler.vcxproj.filtersin >$@
- rm g-ir-compiler.vs10.sourcefiles.filters
-
-#--------------------------------
-# Generate the "lists" of headers
-# and Python scripts to install
-#--------------------------------
-./build/win32/vs9/gir.vs9.install:
- echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository&#x0D;&#x0A;' >./build/win32/vs9/gir.vs9.install
- echo '' >>./build/win32/vs9/gir.vs9.install
- for F in `echo $(girepo_HEADERS) | tr '/' '\\\\'`; do \
- case $$F in \
- *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository&#x0D;&#x0A;' \
- ;; \
- esac; \
- done >>./build/win32/vs9/gir.vs9.install
- echo '' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\collections&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Gjs&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Python&#x0D;&#x0A;' >>./build/win32/vs9/gir.vs9.install
- echo '' >>./build/win32/vs9/gir.vs9.install
for F in `echo $(pkgpyexec_PYTHON) $(collections_PYTHON) $(nobase_dist_template_DATA) | tr '/' '\\\\'`; do \
case $$F in \
giscanner\\doctemplates\\C\\*.tmpl) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C&#x0D;&#x0A;' \
@@ -141,25 +48,8 @@
giscanner\\*.py) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;' \
;; \
esac; \
- done >>./build/win32/vs9/gir.vs9.install
+ done >>$(top_builddir)/build/win32/vs9/giscanner.scripts
-./build/win32/vs10/gir.vs10.install:
- echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository' >./build/win32/vs10/gir.vs10.install
- echo '' >>./build/win32/vs10/gir.vs10.install
- for F in `echo $(girepo_HEADERS) | tr '/' '\\\\'`; do \
- case $$F in \
- *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository' && \
- echo '' \
- ;; \
- esac; \
- done >>./build/win32/vs10/gir.vs10.install
- echo '' >>./build/win32/vs10/gir.vs10.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\collections' >>./build/win32/vs10/gir.vs10.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates' >>./build/win32/vs10/gir.vs10.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C' >>./build/win32/vs10/gir.vs10.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Gjs' >>./build/win32/vs10/gir.vs10.install
- echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\Python' >>./build/win32/vs10/gir.vs10.install
- echo '' >>./build/win32/vs10/gir.vs10.install
for F in `echo $(pkgpyexec_PYTHON) $(collections_PYTHON) $(nobase_dist_template_DATA) | tr '/' '\\\\'`; do \
case $$F in \
giscanner\\doctemplates\\C\\*.tmpl) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner\doctemplates\C' \
@@ -172,33 +62,21 @@
;; \
giscanner\\collections\\*.py) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner\collections' \
;; \
- giscanner\\*.py) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner' && \
- echo '' \
+ giscanner\\*.py) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner' \
;; \
esac; \
- done >>./build/win32/vs10/gir.vs10.install
+ done >>$(top_builddir)/build/win32/vs10/giscanner.vs10.scripts
-./build/win32/vs9/gi-install.vsprops: ./build/win32/vs9/gir.vs9.install $(top_srcdir)/build/win32/vs9/gi-install.vspropsin
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gi-install.vspropsin >$@
- rm ./build/win32/vs9/gir.vs9.install
+include $(top_srcdir)/build/Makefile.msvcproj
-./build/win32/vs10/gi-install.props: ./build/win32/vs10/gir.vs10.install $(top_srcdir)/build/win32/vs10/gi-install.propsin
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gi-install.propsin >$@
- rm ./build/win32/vs10/gir.vs10.install
+# Autotools: Why must we do this instead of 'dist-hook'?
+MSVCPROJ_GENERATED = \
+ $(top_builddir)/build/win32/vs9/cmph.vcproj \
+ $(top_builddir)/build/win32/vs9/girepository.vcproj \
+ $(top_builddir)/build/win32/vs9/g-ir-compiler.vcproj
-GENERATED_MSVC_FILES = \
- ./build/win32/vs9/girepository.vcproj \
- ./build/win32/vs10/girepository.vcxproj \
- ./build/win32/vs10/girepository.vcxproj.filters \
- ./build/win32/vs9/g-ir-compiler.vcproj \
- ./build/win32/vs10/g-ir-compiler.vcxproj \
- ./build/win32/vs10/g-ir-compiler.vcxproj.filters \
- ./build/win32/vs9/cmph.vcproj \
- ./build/win32/vs10/cmph.vcxproj \
- ./build/win32/vs10/cmph.vcxproj.filters \
- config.h.win32
+$(MSVCPROJ_GENERATED): $(top_builddir)/build/win32/vs9/girepository.headers $(top_builddir)/build/win32/vs9/giscanner.scripts
-EXTRA_DIST += \
- $(GENERATED_MSVC_FILES)
+EXTRA_DIST += $(MSVCPROJ_GENERATED) config.h.win32
-CLEANFILES += $(GENERATED_MSVC_FILES)
+DISTCLEANFILES = config.h.win32
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index d0d32caa..297224c2 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -1,10 +1,18 @@
+GENERATED_ITEMS = \
+ cmph.vcxproj \
+ cmph.vcxproj.filters \
+ girepository.vcxproj \
+ girepository.vcxproj.filters \
+ g-ir-compiler.vcxproj \
+ g-ir-compiler.vcxproj.filters \
+ gi-install.props
+
EXTRA_DIST = \
gobject-introspection.sln \
gi-build-defines.props \
gi-extra-paths.props \
gi-gen-srcs.props \
gi-install.propsin \
- gi-install.props \
gi-version-paths.props \
gi-prebuild.vcxproj \
girepository.vcxprojin \
@@ -22,10 +30,12 @@ EXTRA_DIST = \
_giscanner.vcxproj \
_giscanner.vcxproj.filters \
install.vcxproj \
- README.txt
+ README.txt \
+ $(GENERATED_ITEMS)
-gi-install.props: $(top_srcdir)/build/win32/vs10/gi-install.propsin gir.vs10.install
+gi-install.props: $(top_srcdir)/build/win32/vs10/gi-install.propsin girepository.vs10.headers giscanner.vs10.scripts
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gi-install.propsin >$@
- rm gir.vs10.install
+ rm girepository.vs10.headers
+ rm giscanner.vs10.scripts
-CLEANFILES = gi-install.props
+DISTCLEANFILES = $(GENERATED_ITEMS)
diff --git a/build/win32/vs10/gi-install.propsin b/build/win32/vs10/gi-install.propsin
index 6bdc997d..bf2c0b71 100644
--- a/build/win32/vs10/gi-install.propsin
+++ b/build/win32/vs10/gi-install.propsin
@@ -24,7 +24,9 @@ copy ..\..\..\tools\g-ir-scanner $(CopyDir)\bin
copy $(BinDir)\glib-print.exe $(CopyDir)\bin
copy $(BinDir)\glib-print.pdb $(CopyDir)\bin
-#include "gir.vs10.install"
+mkdir $(CopyDir)\include\gobject-introspection-1.0\girepository
+#include "girepository.vs10.headers"
+#include "giscanner.vs10.scripts"
copy $(BinDir)\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner
copy $(BinDir)\_giscanner.pdb $(CopyDir)\lib\gobject-introspection\giscanner
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 4fa1e768..0c5845d8 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -1,24 +1,31 @@
+GENERATED_ITEMS = \
+ cmph.vcproj \
+ girepository.vcproj \
+ g-ir-compiler.vcproj \
+ gi-install.vsprops
+
EXTRA_DIST = \
gobject-introspection.sln \
gi-build-defines.vsprops \
gi-extra-paths.vsprops \
gi-gen-srcs.vsprops \
gi-install.vspropsin \
- gi-install.vsprops \
gi-version-paths.vsprops \
gi-prebuild.vcproj \
girepository.vcprojin \
- cmph-bdz-test.vcproj \
- cmph.vcprojin \
+ cmph-bdz-test.vcproj \
+ cmph.vcprojin \
g-ir-compiler.vcprojin \
g-ir-generate.vcproj \
glib-print.vcproj \
install.vcproj \
_giscanner.vcproj \
- README.txt
+ README.txt \
+ $(GENERATED_ITEMS)
-gi-install.vsprops: $(top_srcdir)/build/win32/vs9/gi-install.vspropsin gir.vs9.install
+gi-install.vsprops: $(top_srcdir)/build/win32/vs9/gi-install.vspropsin girepository.headers giscanner.scripts
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/gi-install.vspropsin >$@
- rm gir.vs9.install
+ rm girepository.headers
+ rm giscanner.scripts
-CLEANFILES = gi-install.vsprops
+DISTCLEANFILES = $(GENERATED_ITEMS)
diff --git a/build/win32/vs9/gi-install.vspropsin b/build/win32/vs9/gi-install.vspropsin
index f7b47165..f47937a3 100644
--- a/build/win32/vs9/gi-install.vspropsin
+++ b/build/win32/vs9/gi-install.vspropsin
@@ -23,7 +23,10 @@ copy ..\..\..\tools\g-ir-scanner $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\glib-print.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\glib-print.pdb $(CopyDir)\bin&#x0D;&#x0A;
-#include "gir.vs9.install"
+mkdir $(CopyDir)\include\gobject-introspection-1.0\girepository&#x0D;&#x0A;
+#include "girepository.headers"
+#include "giscanner.scripts"
+
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;