Store objects from vcl/generic and vcl/headless in a couple of
variables so we don't need to repeat the quite long list for every
target that uses them.

The vcl/headless files currently are used only by the android port but the plan is to share them with the headless stuff i'm cooking.

I've done a full build only on top of some local changes because i don't have all the needed dependencies on my build machine but it looks it works fine :)

thanks

--
Riccardo Magliocchetti
>From 1b2a2e3774d2262508c4d368d1951eefbd896fe8 Mon Sep 17 00:00:00 2001
From: Riccardo Magliocchetti <riccardo.magliocche...@gmail.com>
Date: Fri, 17 Feb 2012 17:42:07 +0100
Subject: [PATCH] vcl: consolidate common objects in Library_vcl.mk

Store objects from vcl/generic and vcl/headless in a couple of
variables so we don't need to repeat the quite long list for every
target that uses them.
---
 vcl/Library_vcl.mk |   64 ++++++++++++++++++++-------------------------------
 1 files changed, 25 insertions(+), 39 deletions(-)

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index c21a3d4..fa00922 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -394,13 +394,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
 ))
 endif
 
-ifeq ($(GUIBASE),unx)
-$(eval $(call gb_Library_add_defs,vcl,\
-    -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
-    -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
-    -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
-))
-$(eval $(call gb_Library_add_exception_objects,vcl,\
+VCL_GENERIC_OBJECTS := \
     vcl/generic/app/gensys \
     vcl/generic/app/geninst \
     vcl/generic/app/gendisp \
@@ -421,7 +415,28 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/generic/fontmanager/fontconfig \
     vcl/generic/fontmanager/fontmanager \
     vcl/generic/fontmanager/helper \
-    vcl/generic/fontmanager/parseAFM \
+    vcl/generic/fontmanager/parseAFM
+
+VCL_HEADLESS_OBJECTS := \
+    vcl/headless/svpbmp \
+    vcl/headless/svpdummies \
+    vcl/headless/svpelement \
+    vcl/headless/svpframe \
+    vcl/headless/svpgdi \
+    vcl/headless/svpinst \
+    vcl/headless/svpdata \
+    vcl/headless/svpprn \
+    vcl/headless/svptext \
+    vcl/headless/svpvd
+
+ifeq ($(GUIBASE),unx)
+$(eval $(call gb_Library_add_defs,vcl,\
+    -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
+    -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
+    -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
+))
+$(eval $(call gb_Library_add_exception_objects,vcl,\
+    $(VCL_GENERIC_OBJECTS) \
     vcl/unx/generic/plugadapt/salplug \
     vcl/unx/generic/printer/cupsmgr \
     vcl/unx/generic/printer/jobdata \
@@ -447,41 +462,12 @@ $(eval $(call gb_Library_add_defs,vcl,\
     -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
 ))
 $(eval $(call gb_Library_add_exception_objects,vcl,\
-    vcl/generic/app/gensys \
-    vcl/generic/app/geninst \
-    vcl/generic/app/gendisp \
-    vcl/generic/print/bitmap_gfx \
-    vcl/generic/print/common_gfx \
-    vcl/generic/print/glyphset \
-    vcl/generic/print/printerjob \
-    vcl/generic/print/psputil \
-    vcl/generic/print/genpspgraphics \
-    vcl/generic/print/genprnpsp \
-    vcl/generic/print/text_gfx \
-    vcl/generic/fontmanager/fontsubst \
-    vcl/generic/glyphs/gcach_ftyp \
-    vcl/generic/glyphs/gcach_layout \
-    vcl/generic/glyphs/gcach_rbmp \
-    vcl/generic/glyphs/glyphcache \
-    vcl/generic/fontmanager/fontcache \
-    vcl/generic/fontmanager/fontconfig \
-    vcl/generic/fontmanager/fontmanager \
-    vcl/generic/fontmanager/helper \
-    vcl/generic/fontmanager/parseAFM \
+    $(VCL_GENERIC_OBJECTS) \
     vcl/unx/generic/printer/jobdata \
     vcl/unx/generic/printer/ppdparser \
     vcl/null/printerinfomanager \
     vcl/android/androidinst \
-    vcl/headless/svpbmp \
-    vcl/headless/svpdummies \
-    vcl/headless/svpelement \
-    vcl/headless/svpframe \
-    vcl/headless/svpgdi \
-    vcl/headless/svpinst \
-    vcl/headless/svpdata \
-    vcl/headless/svpprn \
-    vcl/headless/svptext \
-    vcl/headless/svpvd \
+    $(VCL_HEADLESS_OBJECTS) \
 ))
 
 $(eval $(call gb_Library_add_linked_libs,vcl,\
-- 
1.7.5.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to