[glibmm/glibmm-2-62] NMake Makefiles: "Install" gmmproc items



commit 0ef7f8f7aa55f33e87127fd9121ec6d1694259a3
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Feb 25 18:03:16 2020 +0800

    NMake Makefiles: "Install" gmmproc items
    
    ...so that one may be able to use these in the future for other -mm packages.
    
    Also update the header installation as they could have been generated during
    the build.  Update README.win32 to indicate building from a GIT checkout is
    better supported, and how one may carry this build out.

 MSVC_NMake/install.mak |  29 ++++++---
 README.win32           | 169 ++++++++++++++++++++++++++++---------------------
 2 files changed, 117 insertions(+), 81 deletions(-)
---
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
index 227ee8eb..f5c1f097 100644
--- a/MSVC_NMake/install.mak
+++ b/MSVC_NMake/install.mak
@@ -2,12 +2,13 @@
 # a path under $(PREFIX).
 
 install: all
-       @if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
-       @if not exist $(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ mkdir 
$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
-       @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\ @mkdir 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private
-       @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs\ @mkdir 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs
-       @if not exist $(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ mkdir 
$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
-       @if not exist $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\ 
@mkdir $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private
+       @if not exist $(PREFIX)\bin\ md $(PREFIX)\bin
+       @if not exist $(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ md 
$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
+       @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\ @md 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private
+       @if not exist 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs\ @md 
$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs
+       @if not exist $(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\ md 
$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include
+       @if not exist $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\ 
@md $(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private
+       @-for %d in (m4 pm) do @md 
$(PREFIX)\share\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\proc\%d
        @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).dll $(PREFIX)\bin
        @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).pdb $(PREFIX)\bin
        @copy /b vs$(PDBVER)\$(CFG)\$(PLAT)\$(GLIBMM_LIBNAME).lib $(PREFIX)\lib
@@ -17,11 +18,19 @@ install: all
        @copy /b $(GLIBMM_EXTRA_DEFS_GEN_LIB) $(PREFIX)\lib
        @copy ..\glib\glibmm.h "$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\"
        @copy ..\gio\giomm.h "$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\"
-       @for %h in ($(glibmm_files_all_h)) do @copy ..\glib\glibmm\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\%h"
-       @for %h in ($(glibmm_generated_private_headers)) do @copy ..\glib\glibmm\private\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\%h"
+       @for %h in ($(glibmm_files_all_h)) do @if exist ..\glib\glibmm\%h copy ..\glib\glibmm\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\%h"
+       @for %h in ($(glibmm_files_all_h)) do @if exist vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\%h copy 
vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\%h"
+       @for %h in ($(glibmm_generated_private_headers)) do @if exist ..\glib\glibmm\private\%h copy 
..\glib\glibmm\private\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\%h"
+       @for %h in ($(glibmm_generated_private_headers)) do @if exist 
vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\private\%h copy vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\private\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\private\%h"
        @for %h in ($(glibmm_files_extra_ph_int)) do @copy ..\glib\glibmm\%h 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm\%h"
-       @for %h in ($(giomm_generated_headers) $(giomm_files_extra_h)) do @copy ..\gio\giomm\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\%h"
-       @for %h in ($(giomm_generated_private_headers)) do @copy ..\gio\giomm\private\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\%h"
+       @for %h in ($(giomm_generated_headers) $(giomm_files_extra_h)) do @if exist ..\gio\giomm\%h copy 
..\gio\giomm\%h "$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\%h"
+       @for %h in ($(giomm_generated_headers) $(giomm_files_extra_h)) do @if exist 
vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\%h copy vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\%h"
+       @for %h in ($(giomm_generated_private_headers)) do @if exist ..\gio\giomm\private\%h copy 
..\gio\giomm\private\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\%h"
+       @for %h in ($(giomm_generated_private_headers)) do @if exist 
vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\private\%h copy vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\private\%h 
"$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\giomm\private\%h"
        @copy ".\glibmm\glibmmconfig.h" 
"$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\"
        @copy ".\giomm\giommconfig.h" 
"$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include\"
        @copy "..\tools\extra_defs_gen\generate_extra_defs.h" 
"$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\glibmm_generate_extra_defs\"
+       @for %d in (m4 pm) do copy ..\tools\%d\* 
$(PREFIX)\share\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\proc\%d
+       @for %f in (gmmproc generate_wrap_init.pl) do @if exist ..\tools\%f copy ..\tools\%f 
$(PREFIX)\share\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\proc
+       @for %f in (gmmproc generate_wrap_init.pl) do @if not exist ..\tools\%f copy ..\tools\%f.in 
$(PREFIX)\share\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\proc\%f
+       @echo Please ensure gmmproc and generate_wrap_init.pl in 
$(PREFIX)\share\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\proc contain the correct paths
diff --git a/README.win32 b/README.win32
index 929858db..45b723bd 100644
--- a/README.win32
+++ b/README.win32
@@ -1,71 +1,98 @@
-Building glibmm on Win32
-===========================
-
-Currently, both the mingw (native win32) gcc compiler and MS Visual
-Studio 2015 and later are supported. glibmm can be built with
-mingw32-gcc using the gnu autotools (automake, autoconf, libtool).
-As explicitly stated in the gtk+ for win32 distribution
-(http://www.gimp.org/win32/), the gcc compiler provided by the cygwin
-distribution should not be used to build glib/glibmm libraries and/or
-applications (see the README.win32 that comes with the gtk+ DLLs).
-This MIGHT cause conflicts between the cygwin and msvcrt runtime
-environments.
-
-1. Mingw
-
-The mingw distribution which has been tested with this release is the
-following :
-
-* MinGW-4.1 as the base distribution.
-
-The bare mingw distribution does not provide the necessary tools (sh, perl, m4
-, autoconf, automake, ..) to run the provided configure script "as is". One
-(currently non supported) solution is to use mingw in conjunction with msys,
-which is readily available on the mingw website (http://www.mingw.org/).
-
-The preferred method is to combine the cygwin distribution (for the unix tools
-that were mentioned above) with mingw by making sure that the mingw
-tools (gcc, ld, dlltool, ..) are called first.
-
-First, make sure that you have working distribution of the native port
-of both libsigc++-2.10.x and glib-2.0 on win32 (see
-http://www.gimp.org/win32). If you can't compile a simple glib example
-using gcc and `pkg-config --cflags --libs`, you should not even think
-about trying to compile glibmm, let alone using precompiled libglibmm
-DLLs to port your glibmm application !
-
-The configure script can then be called using (as an example) the
-following options
-
-./configure --prefix=/target --build=i386-pc-mingw32 --disable-static
-
-then
-
-make
-make check
-make install
-
-2. MS Visual Studio 2015
-
-In a Visual Studio command prompt, navigate to the MSVC_NMake directory.
-Run 'nmake /f Makefile.vc CFG=[release|debug]' to build the glibmm and
-giomm DLLs, along with their example programs.  If a prefix other than
-$(srcroot)\..\vs$(VSVER)\$(Platform) is desired, pass in PREFIX=$(your_prefix)
-in the NMake command line.  In order to build the giomm settings example
-program, the glib-compile-schemas needs to reside in $(PREFIX)\bin, or
-it must be specified via passing in GLIB_COMPILE_SCHEMAS.  If you are using
-C++ dependencies that are built with Meson, specify USE_MESON_LIBS=1 in
-your NMake command line.
-
-Note that $(VSVER) refers to 14 for Visual Studio 2015 and 15 for Visual
-Studio 2017.
-
-A 'tests' target will build the test programs for glibmm and giomm, an
-'install' target is provided to copy the built DLLs and LIBs, along with
-with the public headers to appropriate subdirs of $(PREFIX).  A 'clean'
-target is also provided to remove all the built files.
-
-3. Glibmm methods and signals not available on win32
-
-All glibmm methods and signals are available on win32.
-
+Building glibmm on Win32
+===========================
+
+Currently, both the mingw (native win32) gcc compiler and MS Visual
+Studio 2015 and later are supported. glibmm can be built with
+mingw32-gcc using the gnu autotools (automake, autoconf, libtool).
+As explicitly stated in the gtk+ for win32 distribution
+(http://www.gimp.org/win32/), the gcc compiler provided by the cygwin
+distribution should not be used to build glib/glibmm libraries and/or
+applications (see the README.win32 that comes with the gtk+ DLLs).
+This MIGHT cause conflicts between the cygwin and msvcrt runtime
+environments.
+
+1. Mingw
+
+The mingw distribution which has been tested with this release is the
+following :
+
+* MinGW-4.1 as the base distribution.
+
+The bare mingw distribution does not provide the necessary tools (sh, perl, m4
+, autoconf, automake, ..) to run the provided configure script "as is". One
+(currently non supported) solution is to use mingw in conjunction with msys,
+which is readily available on the mingw website (http://www.mingw.org/).
+
+The preferred method is to combine the cygwin distribution (for the unix tools
+that were mentioned above) with mingw by making sure that the mingw
+tools (gcc, ld, dlltool, ..) are called first.
+
+First, make sure that you have working distribution of the native port
+of both libsigc++-2.10.x and glib-2.0 on win32 (see
+http://www.gimp.org/win32). If you can't compile a simple glib example
+using gcc and `pkg-config --cflags --libs`, you should not even think
+about trying to compile glibmm, let alone using precompiled libglibmm
+DLLs to port your glibmm application !
+
+The configure script can then be called using (as an example) the
+following options
+
+./configure --prefix=/target --build=i386-pc-mingw32 --disable-static
+
+then
+
+make
+make check
+make install
+
+2. MS Visual Studio 2015
+
+In a Visual Studio command prompt, navigate to the MSVC_NMake directory.
+Run 'nmake /f Makefile.vc CFG=[release|debug]' to build the glibmm and
+giomm DLLs, along with their example programs.  If a prefix other than
+$(srcroot)\..\vs$(VSVER)\$(Platform) is desired, pass in PREFIX=$(your_prefix)
+in the NMake command line.  In order to build the giomm settings example
+program, the glib-compile-schemas needs to reside in $(PREFIX)\bin, or
+it must be specified via passing in GLIB_COMPILE_SCHEMAS.  If you are using
+C++ dependencies that are built with Meson, specify USE_MESON_LIBS=1 in
+your NMake command line.
+
+Note that $(VSVER) refers to 14 for Visual Studio 2015 and 15 for Visual
+Studio 2017.
+
+A 'tests' target will build the test programs for glibmm and giomm, an
+'install' target is provided to copy the built DLLs and LIBs, along with
+with the public headers to appropriate subdirs of $(PREFIX).  A 'clean'
+target is also provided to remove all the built files.
+
+The NMake Makefiles now support building the glibmm libraries directly from a GIT checkout
+with a few manual steps required, namely to:
+
+-Ensure that you have a copy of Cygwin or MSYS/MSYS64 installed, including
+ m4.exe and sh.exe.  You should also have a PERL for Windows installation
+ as well, and your PATH should contain the paths to your PERL interpreter
+ and the bin\ directory of your Cygwin or MSYS/MSYS64 installation, and
+ it is recommended that these paths are towards the end of your PATH.
+
+-Make a new copy of the entire source tree to some location, where the build
+ is to be done; then:
+--Copy $(srcroot)\glib\glibmmconfig.h.in to $(srcroot)\MSVC_NMake\glibmm\glibmmconfig.h
+--Copy $(srcroot)\gio\giommconfig.h.in to $(srcroot)\MSVC_NMake\giomm\giommconfig.h
+--Copy $(srcroot)\MSVC_NMake\glibmm\glibmm.rc.in to $(srcroot)\MSVC_NMake\glibmm\glibmm.rc
+--Copy $(srcroot)\MSVC_NMake\giomm\giomm.rc.in to $(srcroot)\MSVC_NMake\giomm\giomm.rc
+--Copy $(srcroot)\tools\gmmproc.in to $(srcroot)\tools\gmmproc
+--Copy $(srcroot)\tools\generate_wrap_init.pl.in to $(srcroot)\tools\generate_wrap_init.pl
+
+After copying the above 6 files, you need to ensure that they reflect on the package version
+that best matches your checkout status and the paths in $(srcroot)\tools\gmmproc and
+$(srcroot)\tools\generate_wrap_init.pl (the items enclosed between the @...@'s) should reflect
+on where you intend for nmake /f Makefile.vc CFG=$(CFG) install to install to (i.e. $(PREFIX)).
+For giommconfig.h, it is recommended to keep GIOMM_STATIC_LIB and GIOMM_DISABLE_DEPRECATED
+undefined unless you know what you are doing (remember, the NMake Makefiles only support DLL
+builds out-of-the-box).  You may ignore the fields in glibmmconfig.h the values between
+#ifdef GLIBMM_CONFIGURE and #endif /* GLIBMM_CONFIGURE */.
+
+3. Glibmm methods and signals not available on win32
+
+All glibmm methods and signals are available on win32.
+


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