summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-03-18 15:24:42 +0100
committerDavid Tardon <dtardon@redhat.com>2012-03-23 06:02:41 +0100
commit424a03e72f10d123bf67a2b36c306b8c09e34669 (patch)
treec683831b8790599f13783cc87a473f1edfd11a23
parent0b7f8b54386b380ee9b1abd0a2207b50c6fbeaca (diff)
simplify pagein creation
-rw-r--r--desktop/Pagein_calc.mk2
-rw-r--r--desktop/Pagein_common.mk21
-rw-r--r--desktop/Pagein_draw.mk2
-rw-r--r--desktop/Pagein_impress.mk2
-rw-r--r--desktop/Pagein_writer.mk2
-rw-r--r--solenv/gbuild/Pagein.mk43
6 files changed, 18 insertions, 54 deletions
diff --git a/desktop/Pagein_calc.mk b/desktop/Pagein_calc.mk
index afbbb157b02e..0423b25d0677 100644
--- a/desktop/Pagein_calc.mk
+++ b/desktop/Pagein_calc.mk
@@ -27,7 +27,7 @@
$(eval $(call gb_Pagein_Pagein,calc))
-$(eval $(call gb_Pagein_add_libs,calc,\
+$(eval $(call gb_Pagein_add_objects,calc,\
sc \
scui \
svx \
diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk
index 06cb024b339d..4d66d3f25c7b 100644
--- a/desktop/Pagein_common.mk
+++ b/desktop/Pagein_common.mk
@@ -28,7 +28,10 @@
$(eval $(call gb_Pagein_Pagein,common))
# sorted in approx. reverse load order (ld.so.1)
-$(eval $(call gb_Pagein_add_libs,common,\
+# TODO: Hmm, so it looks like there are duplicates in the list... Moreover,
+# some that are conditional above are not conditional here (e.g., icule).
+# I have doubts about gconfbe, desktopbe and localebe too.
+$(eval $(call gb_Pagein_add_objects,common,\
i18npool \
$(if $(findstring YES,$(SYSTEM_ICU)),,\
icui18n \
@@ -52,9 +55,6 @@ $(eval $(call gb_Pagein_add_libs,common,\
sot \
xcr \
sb \
-))
-
-$(eval $(call gb_Pagein_add_libs_with_dir,common,\
stocservices \
bootstrap \
reg \
@@ -63,10 +63,6 @@ $(eval $(call gb_Pagein_add_libs_with_dir,common,\
cppuhelper \
cppu \
sal \
- ,../ure-link/lib \
-))
-
-$(eval $(call gb_Pagein_add_libs,common,\
ucbhelper \
comphelper \
tl \
@@ -74,18 +70,9 @@ $(eval $(call gb_Pagein_add_libs,common,\
svl \
vcl \
tk \
-))
-
-$(eval $(call gb_Pagein_add_objects,common,\
../ure-link/share/misc/types.rdb \
services.rdb \
oovbaapi.rdb \
-))
-
-# TODO: Hmm, so it looks like there are duplicates in the list... Moreover,
-# some that are conditional above are not conditional here (e.g., icule).
-# I have doubts about gconfbe, desktopbe and localebe too.
-$(eval $(call gb_Pagein_add_libs,common,\
deployment \
deploymentmisc \
ucb1 \
diff --git a/desktop/Pagein_draw.mk b/desktop/Pagein_draw.mk
index 5795b0567979..be3b8e0814b1 100644
--- a/desktop/Pagein_draw.mk
+++ b/desktop/Pagein_draw.mk
@@ -27,7 +27,7 @@
$(eval $(call gb_Pagein_Pagein,draw))
-$(eval $(call gb_Pagein_add_libs,draw,\
+$(eval $(call gb_Pagein_add_objects,draw,\
sd \
sdui \
svx \
diff --git a/desktop/Pagein_impress.mk b/desktop/Pagein_impress.mk
index ae331f84712c..51047228a2f3 100644
--- a/desktop/Pagein_impress.mk
+++ b/desktop/Pagein_impress.mk
@@ -27,7 +27,7 @@
$(eval $(call gb_Pagein_Pagein,impress))
-$(eval $(call gb_Pagein_add_libs,impress,\
+$(eval $(call gb_Pagein_add_objects,impress,\
sd \
sdui \
svx \
diff --git a/desktop/Pagein_writer.mk b/desktop/Pagein_writer.mk
index 206e18a3d986..c9694a5e750e 100644
--- a/desktop/Pagein_writer.mk
+++ b/desktop/Pagein_writer.mk
@@ -27,7 +27,7 @@
$(eval $(call gb_Pagein_Pagein,writer))
-$(eval $(call gb_Pagein_add_libs,writer,\
+$(eval $(call gb_Pagein_add_objects,writer,\
sw \
swui \
svx \
diff --git a/solenv/gbuild/Pagein.mk b/solenv/gbuild/Pagein.mk
index ead8f8a5df2d..60d98acfb158 100644
--- a/solenv/gbuild/Pagein.mk
+++ b/solenv/gbuild/Pagein.mk
@@ -25,20 +25,16 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-gb_Pagein__istype = $(findstring $(2),$(call gb_Pagein__prefix,$(1)))
-gb_Pagein__prefix = $(firstword $(subst :, ,$(1)))
-gb_Pagein__suffix = $(lastword $(subst :, ,$(1)))
-gb_Pagein__object = $(call gb_Pagein__suffix,$(1))
-gb_Pagein__dir = $(call gb_Pagein__prefix,$(1))
-gb_Pagein__libname = $(notdir $(call gb_Library_get_target,$(call gb_Pagein__suffix,$(1))))
-gb_Pagein__libpath = $(call gb_Pagein__dir,$(1))/$(call gb_Pagein__libname,$(1))
+gb_Pagein_UREPATH := ../ure-link/lib/
+
+gb_Pagein__is_library = $(filter $(1),$(gb_Library_KNOWNLIBS))
+
+gb_Pagein__get_libdir = $(if $(filter URELIB,$(call gb_Library_get_layer,$(1))),$(call gb_Pagein_UREPATH))
+
+gb_Pagein__make_library_path = $(call gb_Pagein__get_libdir,$(1))$(call gb_Library_get_runtime_filename,$(1))
gb_Pagein__make_path = \
-$(if $(call gb_Pagein__istype,$(1),OBJ),\
- $(call gb_Pagein__object,$(1)),\
- $(if $(call gb_Pagein__istype,$(1),LIB),\
- $(call gb_Pagein__libname,$(1)),\
- $(call gb_Pagein__libpath,$(1))))
+$(if $(call gb_Pagein__is_library,$(1)),$(call gb_Pagein__make_library_path,$(1)),$(1))
define gb_Pagein__command
$(call gb_Output_announce,$(2),$(true),PAG,5)
@@ -62,33 +58,14 @@ $(call gb_Pagein_get_outdir_target,%) : $(call gb_Pagein_get_target,%)
define gb_Pagein_Pagein
$(call gb_Pagein_get_target,$(1)) : OBJECTS :=
+$(call gb_Pagein_get_target,$(1)) : $(realpath $(lastword $(MAKEFILE_LIST)))
$$(eval $$(call gb_Module_register_target,$(call gb_Pagein_get_outdir_target,$(1)),$(call gb_Pagein_get_clean_target,$(1))))
$(call gb_Pagein_get_outdir_target,$(1)) : $(call gb_Pagein_get_target,$(1))
endef
-define gb_Pagein_add_lib
-$(call gb_Pagein_get_target,$(1)) : OBJECTS += LIB:$(2)
-
-endef
-
-define gb_Pagein_add_lib_with_dir
-$(call gb_Pagein_get_target,$(1)) : OBJECTS += $(strip $(3)):$(2)
-
-endef
-
define gb_Pagein_add_object
-$(call gb_Pagein_get_target,$(1)) : OBJECTS += OBJ:$(2)
-
-endef
-
-define gb_Pagein_add_libs
-$(foreach lib,$(2),$(call gb_Pagein_add_lib,$(1),$(lib)))
-
-endef
-
-define gb_Pagein_add_libs_with_dir
-$(foreach lib,$(2),$(call gb_Pagein_add_lib_with_dir,$(1),$(lib),$(3)))
+$(call gb_Pagein_get_target,$(1)) : OBJECTS += $(2)
endef