Update autotools for Visual C++ projects creation
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 14 Aug 2012 08:17:31 +0000 (16:17 +0800)
committerColin Walters <walters@verbum.org>
Sat, 27 Oct 2012 16:06:11 +0000 (12:06 -0400)
-Add Makefile-msvcproj.am to fill in the cmph, girepository and
 g-ir-compiler projects
-Add various Makefile.am's under build/ to distribute the
 Visual C++-related files.

https://bugzilla.gnome.org/show_bug.cgi?id=681820

Makefile-msvcproj.am [new file with mode: 0644]
Makefile.am
build/Makefile.am [new file with mode: 0644]
build/win32/Makefile.am [new file with mode: 0644]
build/win32/vs10/Makefile.am [new file with mode: 0644]
build/win32/vs9/Makefile.am [new file with mode: 0644]
configure.ac

diff --git a/Makefile-msvcproj.am b/Makefile-msvcproj.am
new file mode 100644 (file)
index 0000000..ccc7faf
--- /dev/null
@@ -0,0 +1,176 @@
+# 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
+
+# -------------------------
+# 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-$$(GIApiVersion)\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-$$(GIApiVersion)\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 '' >>./build/win32/vs9/gir.vs9.install
+       for F in `echo $(pkgpyexec_PYTHON) | tr '/' '\\'`; do \
+               case $$F in \
+               *.py|*.tmpl) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner&#x0D;&#x0A;' \
+                       ;; \
+               esac; \
+       done >>./build/win32/vs9/gir.vs9.install
+
+./build/win32/vs10/gir.vs10.install:
+       echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(GIApiVersion)\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-$$(GIApiVersion)\girepository' && \
+                       echo '' \
+                       ;; \
+               esac; \
+       done >>./build/win32/vs10/gir.vs10.install
+       echo '' >>./build/win32/vs10/gir.vs10.install
+       echo 'mkdir $$(CopyDir)\lib\gobject-introspection\giscanner' >>./build/win32/vs10/gir.vs10.install
+       echo '' >>./build/win32/vs10/gir.vs10.install
+       for F in `echo $(pkgpyexec_PYTHON) | tr '/' '\\'`; do \
+               case $$F in \
+               *.py|*.tmpl) echo 'copy ..\..\..\'$$F' $$(CopyDir)\lib\gobject-introspection\giscanner' && \
+                       echo '' \
+                       ;; \
+               esac; \
+       done >>./build/win32/vs10/gir.vs10.install
+
+./build/win32/vs9/gir.vsprops: ./build/win32/vs9/gir.vs9.install $(top_srcdir)/build/win32/vs9/gir.vspropsin
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gir.vspropsin >$@
+       rm ./build/win32/vs9/gir.vs9.install
+
+./build/win32/vs10/gir.props: ./build/win32/vs10/gir.vs10.install $(top_srcdir)/build/win32/vs10/gir.propsin
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gir.propsin >$@
+       rm ./build/win32/vs10/gir.vs10.install
+
+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
+
+EXTRA_DIST +=  \
+       ./girepository/girepository.symbols     \
+       $(GENERATED_MSVC_FILES)
+
+CLEANFILES += $(GENERATED_MSVC_FILES)
index a36c200a1137224094c8e7584878a7bae28c746a..2059b989febfe6d94fa8cc152cece368e5d57175 100644 (file)
@@ -21,11 +21,12 @@ include Makefile-giscanner.am
 include Makefile-examples.am
 include Makefile-gir.am
 include Makefile-tools.am
+include Makefile-msvcproj.am
 
 ## Process this file with automake to produce Makefile.in
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
-SUBDIRS = . docs tests
+SUBDIRS = . docs tests build
 
 DIST_SUBDIRS = m4 $(SUBDIRS)
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644 (file)
index 0000000..0f81afe
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = win32
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
new file mode 100644 (file)
index 0000000..499c5cf
--- /dev/null
@@ -0,0 +1,15 @@
+SUBDIRS = vs9 vs10
+
+EXTRA_DIST = \
+       annotation.def  \
+       everything.def  \
+       foo.def \
+       gengir.bat      \
+       gettype.def     \
+       gimarshallingtests.def  \
+       gtkfrob.def     \
+       Regress.def     \
+       sletter.def     \
+       testinherit.def \
+       test_gir_cmd.txt        \
+       utility.def
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
new file mode 100644 (file)
index 0000000..0046bc4
--- /dev/null
@@ -0,0 +1,47 @@
+EXTRA_DIST = \
+       gobject-introspection.sln       \
+       girepository.vcxprojin  \
+       girepository.vcxproj.filtersin  \
+       gir.propsin     \
+       gir.props       \
+       annotation.vcxproj      \
+       annotation.vcxproj.filters      \
+       cmph-bdz-test.vcxproj   \
+       cmph-bdz-test.vcxproj.filters   \
+       cmph.vcxprojin  \
+       cmph.vcxproj.filtersin  \
+       everything.vcxproj      \
+       everything.vcxproj.filters      \
+       foo.vcxproj     \
+       foo.vcxproj.filters     \
+       g-ir-compiler.vcxprojin \
+       g-ir-compiler.vcxproj.filtersin \
+       g-ir-generate.vcxproj   \
+       g-ir-generate.vcxproj.filters   \
+       gettype.vcxproj \
+       gettype.vcxproj.filters \
+       gimarshallingtests.vcxproj      \
+       gimarshallingtests.vcxproj.filters      \
+       glib-print.vcxproj      \
+       glib-print.vcxproj.filters      \
+       gtkfrob.vcxproj \
+       gtkfrob.vcxproj.filters \
+       regress.vcxproj \
+       regress.vcxproj.filters \
+       sletter.vcxproj \
+       sletter.vcxproj.filters \
+       testinherit.vcxproj     \
+       testinherit.vcxproj.filters     \
+       utility.vcxproj \
+       utility.vcxproj.filters \
+       _giscanner.vcxproj      \
+       _giscanner.vcxproj.filters      \
+       generate_typelibs.vcxproj       \
+       install.vcxproj \
+       README.txt
+
+gir.props: $(top_srcdir)/build/win32/vs10/gir.propsin gir.vs10.install
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gir.propsin >$@
+       rm gir.vs10.install
+
+CLEANFILES = gir.props
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
new file mode 100644 (file)
index 0000000..ed82cbc
--- /dev/null
@@ -0,0 +1,30 @@
+EXTRA_DIST = \
+       gobject-introspection.sln       \
+       girepository.vcprojin   \
+       gir.vspropsin   \
+       gir.vsprops     \
+       annotation.vcproj       \
+       cmph-bdz-test.vcproj    \
+       cmph.vcprojin   \
+       everything.vcproj       \
+       foo.vcproj      \
+       g-ir-compiler.vcprojin  \
+       g-ir-generate.vcproj    \
+       generate_typelibs.vcproj        \
+       gettype.vcproj  \
+       gimarshallingtests.vcproj       \
+       glib-print.vcproj       \
+       gtkfrob.vcproj  \
+       install.vcproj  \
+       regress.vcproj  \
+       sletter.vcproj  \
+       testinherit.vcproj      \
+       utility.vcproj  \
+       _giscanner.vcproj       \
+       README.txt
+
+gir.vsprops: $(top_srcdir)/build/win32/vs9/gir.vspropsin gir.vs9.install
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gir.vspropsin >$@
+       rm gir.vs9.install
+
+CLEANFILES = gir.vsprops
index e488cea99035777a8437b0d1743ae4866f03a142..ca7831553fc08c883c5776a821d08d9dc82d0076 100644 (file)
@@ -300,7 +300,12 @@ tests/doctool/Makefile
 docs/Makefile
 docs/reference/Makefile
 gobject-introspection-1.0.pc
-gobject-introspection-no-export-1.0.pc])
+gobject-introspection-no-export-1.0.pc
+config.h.win32
+build/Makefile
+build/win32/Makefile
+build/win32/vs9/Makefile
+build/win32/vs10/Makefile])
 AC_OUTPUT
 
 echo "