[gtkmm/use-dllexport: 24/60] NMake Makefiles: Speed up builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/use-dllexport: 24/60] NMake Makefiles: Speed up builds
- Date: Mon, 8 Jun 2020 02:44:01 +0000 (UTC)
commit 9a2f2e266a90dc77fc959536e07095c22b3af5ac
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Apr 10 15:55:34 2020 +0800
NMake Makefiles: Speed up builds
Use 'md' to create the intermediate directories instead of making use of
NMake Makefile rules. By doing so we can reduce re-loading the NMake
Makefiles, which can cut down on build times.
MSVC_NMake/build-rules-msvc.mak | 12 ++++++++----
MSVC_NMake/generate-msvc.mak | 23 ++++-------------------
2 files changed, 12 insertions(+), 23 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index 8ed7bd20..66fc13a9 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -19,12 +19,13 @@ $<
<<
{..\gdk\gdkmm\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\}.obj::
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\ md vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm
$(CXX) $(LIBGDKMM_CFLAGS) $(CFLAGS_NOGL) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\ /c @<<
$<
<<
{..\gdk\src\}.ccg{vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\}.obj:
- @if not exist $(@D)\private\ $(MAKE) /f Makefile.vc CFG=$(CFG) $(@D)\private
+ @if not exist $(@D)\private\ md $(@D)\private
@for %%s in ($(<D)\*.ccg) do @if not exist ..\gdk\gdkmm\%%~ns.cc if not exist $(@D)\%%~ns.cc $(PERL)
-- $(GMMPROC_DIR)/gmmproc -I ../tools/m4 -I $(GMMPROC_PANGO_DIR) -I $(GMMPROC_ATK_DIR) --defs $(<D:\=/) %%~ns
$(<D:\=/) $(@D)
@if exist $(@D)\$(<B).cc $(CXX) $(LIBGDKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(@D)\ /Fd$(@D)\ /c
$(@D)\$(<B).cc
@if exist ..\gdk\gdkmm\$(<B).cc $(CXX) $(LIBGDKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(@D)\ /Fd$(@D)\ /c
..\gdk\gdkmm\$(<B).cc
@@ -35,20 +36,23 @@ $<
<<
{..\gtk\gtkmm\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\}.obj::
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\ md vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm
$(CXX) $(LIBGTKMM_CFLAGS) $(CFLAGS_NOGL) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\ /c @<<
$<
<<
{..\gtk\src\}.ccg{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\}.obj:
- @if not exist $(@D)\private\ $(MAKE) /f Makefile.vc CFG=$(CFG) $(@D)\private
+ @if not exist $(@D)\private\ md $(@D)\private
@for %%s in ($(<D)\*.ccg) do @if not exist ..\gtk\gtkmm\%%~ns.cc if not exist $(@D)\%%~ns.cc $(PERL)
-- $(GMMPROC_DIR)/gmmproc -I ../tools/m4 -I $(GMMPROC_PANGO_DIR) -I $(GMMPROC_ATK_DIR) --defs $(<D:\=/) %%~ns
$(<D:\=/) $(@D)
@if exist $(@D)\$(<B).cc $(CXX) $(LIBGTKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(@D)\ /Fd$(@D)\ /c
$(@D)\$(<B).cc
@if exist ..\gtk\gtkmm\$(<B).cc $(CXX) $(LIBGTKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(@D)\ /Fd$(@D)\ /c
..\gtk\gtkmm\$(<B).cc
{.\gtkmm\}.rc{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\}.res:
+ @if not exist $(@D)\ md $(@D)
rc /fo$@ $<
{..\demos\gtk-demo\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\}.obj::
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ md vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo
$(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ /c @<<
$<
<<
@@ -85,7 +89,7 @@ $(gtkmm_OBJS) $(gdkmm_OBJS)
# For the gendef tool
{.\gendef\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\}.exe:
- @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG)
vs$(VSVER)\$(CFG)\$(PLAT)\gendef
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gendef\ md vs$(VSVER)\$(CFG)\$(PLAT)\gendef
$(CXX) $(GTKMM_BASE_CFLAGS) $(CFLAGS) /Fo$(@D)\gendef\ /Fd$(@D)\gendef\ $< /link $(LDFLAGS) /out:$@
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
@@ -125,7 +129,7 @@ vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-scrolledwindow.exe \
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-tree_model_iterator.exe \
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-wrap_existing.exe:
@if not exist $(GTKMM_LIB) $(MAKE) /f Makefile.vc $(SAVED_OPTIONS) $(GTKMM_LIB)
- @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\$(@B) $(MAKE) /f Makefile.vc $(SAVED_OPTIONS)
vs$(VSVER)\$(CFG)\$(PLAT)\$(@B)
+ @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\$(@B) md vs$(VSVER)\$(CFG)\$(PLAT)\$(@B)
$(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fo$(@D)\$(@B)\ /Fd$(@D)\$(@B)\ $** \
/link $(LDFLAGS) $(GTKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
index 91a2d588..a6f76fc3 100644
--- a/MSVC_NMake/generate-msvc.mak
+++ b/MSVC_NMake/generate-msvc.mak
@@ -4,34 +4,19 @@
# one is maintaining the NMake build files.
# Create the build directories
-vs$(VSVER)\$(CFG)\$(PLAT)\gendef \
vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm \
-vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\private \
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\private \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-builder \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-child_widget \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-child_widget2 \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-child_widget_managed \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-delete_cpp_child \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-dialog_deletethis \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-main_with_options \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-menu_destruction \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-object_move \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-property_notification \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-refcount_dialog \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-scrolledwindow \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-tree_model_iterator \
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-test-wrap_existing:
+vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo:
@-mkdir $@
# Generate wrap_init.cc files
vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\wrap_init.cc: $(gdkmm_real_hg)
+ @if not exist $(@D)\ md $(@D)
@if not exist ..\gdk\gdkmm\wrap_init.cc $(PERL) -- "$(GMMPROC_DIR)/generate_wrap_init.pl"
--namespace=Gdk --parent_dir=gdkmm $(gdkmm_real_hg:\=/)>$@
# Avoid the dreaded U1095 command line error... @#$@#!
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\wrap_init.cc: $(gtkmm_real_hg)
+ @if not exist $(@D)\ md $(@D)
@if exist $@ del $@
@echo @echo off>gen_$(@B).bat
@echo.>>gen_$(@B).bat
@@ -42,7 +27,7 @@ vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\wrap_init.cc: $(gtkmm_real_hg)
@del gen_$(@B).bat
# Generate .def files
-vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\gtkmm.def: $(GENDEF) vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm $(gdkmm_OBJS) $(gtkmm_OBJS)
+vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\gtkmm.def: $(GENDEF) $(gdkmm_OBJS) $(gtkmm_OBJS)
vs$(VSVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(GTKMM_LIBNAME) vs$(VSVER)\$(CFG)\$(PLAT)\gdkmm\*.obj
vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm\*.obj
# Generate demo GResource source file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]