[PATCH] replace CustomTarget_odk/odkcommon/lib by Package

David Tardon (via Code Review) gerrit at gerrit.libreoffice.org
Sun Apr 21 09:16:09 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3532

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/32/3532/1

replace CustomTarget_odk/odkcommon/lib by Package

Change-Id: I929384077255b2fd944abf2da573c66572dec62b
---
M odk/CustomTarget_check.mk
D odk/CustomTarget_lib.mk
M odk/CustomTarget_odkcommon.mk
M odk/Module_odk.mk
A odk/Package_lib.mk
M scp2/source/sdkoo/module_sdkoo.scp
M scp2/source/sdkoo/sdkoo.scp
7 files changed, 38 insertions(+), 42 deletions(-)



diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
index 29b2776..f820e47 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -29,6 +29,7 @@
 		$(SRCDIR)/odk/util/check.pl \
 		$(call gb_Package_get_target,odk_bin) \
 		$(if $(filter WNT,$(OS)),$(call gb_Package_get_target,odk_cli)) \
+		$(call gb_Package_get_target,odk_lib) \
 		$(if $(filter MACOSX,$(OS)),macosx,$(call gb_Package_get_target,odk_macosx)) \
 		$(if $(SOLAR_JAVA),$(call gb_Package_get_target,odk_unowinreg)) \
 		$(call gb_CustomTarget_get_target,odk/odkcommon)
diff --git a/odk/CustomTarget_lib.mk b/odk/CustomTarget_lib.mk
deleted file mode 100644
index 910211e..0000000
--- a/odk/CustomTarget_lib.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/lib))
-
-define odk_lib
-odkcommon_ZIPLIST += lib/$(notdir $(1))
-$(call gb_CustomTarget_get_target,odk/odkcommon/lib) : \
-	$(odk_WORKDIR)/lib/$(notdir $(1))
-$(odk_WORKDIR)/lib/$(notdir $(1)) : $(1)
-	mkdir -p $$(dir $$@)
-	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
-	cp $$< $$@
-endef
-
-ifeq ($(COM),MSC)
-odk_LIBLIST := \
-	sal \
-	salhelper \
-	cppu \
-	cppuhelper \
-	purpenvhelper
-
-$(foreach lib,$(odk_LIBLIST),$(eval $(call odk_lib,$(call gb_Library_get_target,$(lib)))))
-else ifeq ($(OS),LINUX)
-odkcommon_ZIPLIST += lib/libsalcpprt.a
-$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/lib,libsalcpprt.a))
-$(odk_WORKDIR)/lib/libsalcpprt.a: $(call gb_StaticLibrary_get_target,salcpprt)
-	mkdir -p $(dir $@)
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
-	cp $< $@
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_odkcommon.mk b/odk/CustomTarget_odkcommon.mk
index 4e903a1..99e42e6 100644
--- a/odk/CustomTarget_odkcommon.mk
+++ b/odk/CustomTarget_odkcommon.mk
@@ -19,7 +19,6 @@
 	$(call gb_CustomTarget_get_target,odk/odkcommon/docs/common/ref) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/settings) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/classes) \
-	$(call gb_CustomTarget_get_target,odk/odkcommon/lib) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/idl) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/include)
 
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
index 531fdbe..58bdb4d 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -14,12 +14,12 @@
 	$(if $(filter WNT,$(OS)),Package_cli) \
 	$(if $(DOXYGEN),CustomTarget_doxygen) \
 	CustomTarget_check \
-	CustomTarget_lib \
 	CustomTarget_settings \
 	CustomTarget_autodoc \
 	Executable_unoapploader \
 	Package_bin \
 	Package_examples \
+	Package_lib \
 ))
 
 ifeq ($(OS),MACOSX)
diff --git a/odk/Package_lib.mk b/odk/Package_lib.mk
new file mode 100644
index 0000000..7ea5d14
--- /dev/null
+++ b/odk/Package_lib.mk
@@ -0,0 +1,28 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,odk_lib,$(gb_Helper_OUTDIRLIBDIR)))
+
+$(eval $(call gb_Package_set_outdir,odk_lib,$(INSTDIR)))
+
+$(eval $(call gb_Package_add_files,odk_lib,$(gb_Package_SDKDIRNAME)/lib,\
+	$(if $(filter MSC,$(COM)),\
+		$(foreach lib,\
+			cppu \
+			cppuhelper \
+			purpenvhelper \
+			sal \
+			salhelper \
+			,$(notdir $(call gb_Library_get_target,$(lib))) \
+		) \
+	) \
+	$(if $(filter LINUX,$(OS)),$(notdir $(call gb_StaticLibrary_get_target,salcpprt))) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/scp2/source/sdkoo/module_sdkoo.scp b/scp2/source/sdkoo/module_sdkoo.scp
index 40316cc..2e55c7b 100644
--- a/scp2/source/sdkoo/module_sdkoo.scp
+++ b/scp2/source/sdkoo/module_sdkoo.scp
@@ -36,6 +36,7 @@
     Files = (
         gid_File_Package_odk_bin,
         gid_File_Package_odk_cli,
+        gid_File_Package_odk_lib,
         gid_File_Package_odk_macosx,
         gid_File_Package_odk_unowinreg,
         gid_File_Zip_Odkexamples,
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
index 4ad8f95..0bc3292 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -132,6 +132,13 @@
 End
 #endif
 
+File gid_File_Package_odk_lib
+    TXT_FILE_BODY;
+    Dir = FILELIST_SDK_DIR;
+    Name = "odk_lib.filelist";
+    Styles = (FILELIST,USE_INTERNAL_RIGHTS);
+End
+
 #if defined(MACOSX)
 File gid_File_Package_odk_macosx
     TXT_FILE_BODY;

-- 
To view, visit https://gerrit.libreoffice.org/3532
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I929384077255b2fd944abf2da573c66572dec62b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon at redhat.com>



More information about the LibreOffice mailing list