[pangomm/pangomm-2-42] NMake Makefiles: Fix generating pangomm[config.h|.rc]
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm/pangomm-2-42] NMake Makefiles: Fix generating pangomm[config.h|.rc]
- Date: Wed, 22 Jul 2020 03:24:14 +0000 (UTC)
commit 07a2f3f2ad32e5ea8c9f74042b6070e05a6a5186
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jul 22 11:12:29 2020 +0800
NMake Makefiles: Fix generating pangomm[config.h|.rc]
The previous additions to generate those files accidentally made the build
attempt to generate them, even if done from a release tarball that is done by
the autotools builds.
This will fix this situation, and improve the situation that if pangomm.rc or
pangommconfig.h needs to be generated, these files will be generated
automatically
MSVC_NMake/Makefile.vc | 1 +
MSVC_NMake/generate-msvc.mak | 38 +++++++++++++++++++++-----------------
README.win32 | 11 +++++++----
3 files changed, 29 insertions(+), 21 deletions(-)
---
diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc
index a27c80f..9471eb2 100644
--- a/MSVC_NMake/Makefile.vc
+++ b/MSVC_NMake/Makefile.vc
@@ -29,6 +29,7 @@ VALID_MSC = TRUE
!ifdef GENERATE_VERSIONED_FILES
!include pkg-ver.mak
+DO_REAL_GEN = 1
!endif
# Include the Makefile portion to convert the source and header lists
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
index 53991a6..d5bc8c5 100644
--- a/MSVC_NMake/generate-msvc.mak
+++ b/MSVC_NMake/generate-msvc.mak
@@ -21,25 +21,29 @@ vs$(VSVER)\$(CFG)\$(PLAT)\pangomm\wrap_init.cc: $(pangomm_real_hg)
prep-git-build: pkg-ver.mak
$(MAKE) /f Makefile.vc CFG=$(CFG) GENERATE_VERSIONED_FILES=1 pangomm\pangomm.rc
pangomm\pangommconfig.h
-pangomm\pangomm.rc: pkg-ver.mak pangomm\pangomm.rc.in
- @echo Generating $@...
- @copy $@.in $@
- @$(PERL) -pi.bak -e "s/\@PANGOMM_MAJOR_VERSION\@/$(PKG_MAJOR_VERSION)/g" $@
- @$(PERL) -pi.bak -e "s/\@PANGOMM_MINOR_VERSION\@/$(PKG_MINOR_VERSION)/g" $@
- @$(PERL) -pi.bak -e "s/\@PANGOMM_MICRO_VERSION\@/$(PKG_MICRO_VERSION)/g" $@
- @$(PERL) -pi.bak -e
"s/\@PACKAGE_VERSION\@/$(PKG_MAJOR_VERSION).$(PKG_MINOR_VERSION).$(PKG_MICRO_VERSION)/g" $@
- @$(PERL) -pi.bak -e
"s/\@PANGOMM_MODULE_NAME\@/pangomm-$(PANGOMM_MAJOR_VERSION).$(PANGOMM_MINOR_VERSION)/g" $@
- @del $@.bak
+pangomm\pangomm.rc: ..\configure.ac pangomm\pangomm.rc.in
+ @if not "$(DO_REAL_GEN)" == "1" if exist pkg-ver.mak del pkg-ver.mak
+ @if not exist pkg-ver.mak $(MAKE) /f Makefile.vc CFG=$(CFG) prep-git-build
+ @if "$(DO_REAL_GEN)" == "1" echo Generating $@...
+ @if "$(DO_REAL_GEN)" == "1" copy $@.in $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@PANGOMM_MAJOR_VERSION\@/$(PKG_MAJOR_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@PANGOMM_MINOR_VERSION\@/$(PKG_MINOR_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\@PANGOMM_MICRO_VERSION\@/$(PKG_MICRO_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e
"s/\@PACKAGE_VERSION\@/$(PKG_MAJOR_VERSION).$(PKG_MINOR_VERSION).$(PKG_MICRO_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e
"s/\@PANGOMM_MODULE_NAME\@/pangomm-$(PANGOMM_MAJOR_VERSION).$(PANGOMM_MINOR_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" del $@.bak
# You may change PANGOMM_DISABLE_DEPRECATED if you know what you are doing
-pangomm\pangommconfig.h: pkg-ver.mak ..\pango\pangommconfig.h.in
- @echo Generating $@...
- @copy ..\pango\$(@F).in $@
- @$(PERL) -pi.bak -e "s/\#undef PANGOMM_DISABLE_DEPRECATED/\/\* \#undef PANGOMM_DISABLE_DEPRECATED
\*\//g" $@
- @$(PERL) -pi.bak -e "s/\#undef PANGOMM_MAJOR_VERSION/\#define PANGOMM_MAJOR_VERSION
$(PKG_MAJOR_VERSION)/g" $@
- @$(PERL) -pi.bak -e "s/\#undef PANGOMM_MINOR_VERSION/\#define PANGOMM_MINOR_VERSION
$(PKG_MINOR_VERSION)/g" $@
- @$(PERL) -pi.bak -e "s/\#undef PANGOMM_MICRO_VERSION/\#define PANGOMM_MICRO_VERSION
$(PKG_MICRO_VERSION)/g" $@
- @del $@.bak
+pangomm\pangommconfig.h: ..\configure.ac ..\pango\pangommconfig.h.in
+ @if not "$(DO_REAL_GEN)" == "1" if exist pkg-ver.mak del pkg-ver.mak
+ @if not exist pkg-ver.mak $(MAKE) /f Makefile.vc CFG=$(CFG) prep-git-build
+ @if "$(DO_REAL_GEN)" == "1" echo Generating $@...
+ @if "$(DO_REAL_GEN)" == "1" copy ..\pango\$(@F).in $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef PANGOMM_DISABLE_DEPRECATED/\/\* \#undef
PANGOMM_DISABLE_DEPRECATED \*\//g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef PANGOMM_MAJOR_VERSION/\#define
PANGOMM_MAJOR_VERSION $(PKG_MAJOR_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef PANGOMM_MINOR_VERSION/\#define
PANGOMM_MINOR_VERSION $(PKG_MINOR_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" $(PERL) -pi.bak -e "s/\#undef PANGOMM_MICRO_VERSION/\#define
PANGOMM_MICRO_VERSION $(PKG_MICRO_VERSION)/g" $@
+ @if "$(DO_REAL_GEN)" == "1" del $@.bak
pkg-ver.mak: ..\configure.ac
@echo Generating version info Makefile Snippet...
diff --git a/README.win32 b/README.win32
index f50f204..5b9940d 100644
--- a/README.win32
+++ b/README.win32
@@ -77,17 +77,20 @@ with a few manual steps required, namely to:
-Make a new copy of the entire source tree to some location, where the build
is to be done; then in $(srcroot)\MSVC_NMake run
- nmake /f Makefile.vc CFG=[release|debug] prep-git-build, which will copy and generate
+ nmake /f Makefile.vc CFG=[release|debug], which will copy and generate
the following files with the proper info:
--$(srcroot)\MSVC_NMake\pangomm\pangommconfig.h
--$(srcroot)\MSVC_NMake\pangomm\pangomm.rc
+ and will proceed with the build
For pangommconfig.h, it is recommended to keep PANGOMM_DISABLE_DEPRECATED
undefined unless you know what you are doing. If $(srcroot)\MSVC_NMake\pangomm\pangommconfig.h
-and/or $(srcroot)\MSVC_NMake\pangomm\pangomm.rc is missing from the release tarball, you may
-also generate them using nmake /f Makefile.vc CFG=[release|debug] prep-git-build.
+and/or $(srcroot)\MSVC_NMake\pangomm\pangomm.rc is missing from the release tarball, they will
+also be generated when nmake /f Makefile.vc CFG=[release|debug] is run.
-Note that the prep-git-build target will require a working PERL installation.
+Note that if $(srcroot)\MSVC_NMake\pangomm\pangommconfig.h and/or
+$(srcroot)\MSVC_NMake\pangomm\pangomm.rc needs to be generated, a working PERL installation is
+required.
3. Using Meson
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]