[Libreoffice-commits] core.git: odk/CustomTarget_check.mk odk/CustomTarget_classes.mk odk/CustomTarget_unowinreg.mk odk/Module_odk.mk odk/Package_unowinreg.mk odk/Zip_uno_loader_classes.mk scp2/source

David Tardon dtardon at redhat.com
Mon Apr 22 00:04:30 PDT 2013


 odk/CustomTarget_check.mk          |    1 +
 odk/CustomTarget_classes.mk        |    7 -------
 odk/CustomTarget_unowinreg.mk      |   12 +-----------
 odk/Module_odk.mk                  |    3 ++-
 odk/Package_unowinreg.mk           |   28 ++++++++++++++++++++++++++++
 odk/Zip_uno_loader_classes.mk      |    1 -
 scp2/source/sdkoo/module_sdkoo.scp |    1 +
 scp2/source/sdkoo/sdkoo.scp        |    9 +++++++++
 8 files changed, 42 insertions(+), 20 deletions(-)

New commits:
commit 1ea1818dd15bcfc1605764b237e6f71e8fcb5635
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Apr 21 15:50:23 2013 +0200

    use Package for unowinreg
    
    Change-Id: I7546e8938ba41e1462e704bd0405c5a887151d7b
    Reviewed-on: https://gerrit.libreoffice.org/3531
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
index c0046cd..cc29e01 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -30,6 +30,7 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
 		$(call gb_Package_get_target,odk_bin) \
 		$(if $(filter WNT,$(OS)),$(call gb_Package_get_target,odk_cli)) \
 		$(if $(filter MACOSX,$(OS)),$(call gb_Package_get_target,odk_macosx)) \
+		$(if $(SOLAR_JAVA),$(call gb_Package_get_target,odk_unowinreg)) \
 		$(call gb_CustomTarget_get_target,odk/odkcommon)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
 	touch $@
diff --git a/odk/CustomTarget_classes.mk b/odk/CustomTarget_classes.mk
index b009a58..ad59a4a 100644
--- a/odk/CustomTarget_classes.mk
+++ b/odk/CustomTarget_classes.mk
@@ -28,11 +28,4 @@ $(odk_WORKDIR)/classes/java.done: $(call gb_JavaClassSet_get_target,loader)
 	cp -a $(call gb_JavaClassSet_get_classdir,loader)/com $(dir $@)
 	touch $@
 
-odkcommon_ZIPLIST += classes/win/unowinreg.dll
-$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/classes,win/unowinreg.dll))
-$(odk_WORKDIR)/classes/win/unowinreg.dll: $(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll
-	mkdir -p $(dir $@)
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
-	cp $< $@
-
 # vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_unowinreg.mk b/odk/CustomTarget_unowinreg.mk
index 76fe2f9..3a46ddf 100644
--- a/odk/CustomTarget_unowinreg.mk
+++ b/odk/CustomTarget_unowinreg.mk
@@ -11,11 +11,6 @@ $(eval $(call gb_CustomTarget_CustomTarget,odk/unowinreg))
 
 $(eval $(call gb_CustomTarget_register_target,odk/unowinreg,unowinreg.dll))
 
-ifeq ($(BUILD_UNOWINREG),YES)
-ifeq ($(COM),MSC)
-$(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll: $(call gb_Library_get_target,unowinreg)
-	cp $< $@
-else # COM=GCC
 $(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll : \
 		$(SRCDIR)/odk/source/unowinreg/win/unowinreg.cxx
 	$(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ \
@@ -25,12 +20,7 @@ $(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll : \
 		-I$(JAVA_HOME)/include/bsd -I$(JAVA_HOME)/include/linux,\
 		$(if $(filter NETBSD,$(OS)),-I$(JAVA_HOME)/include/netbsd))) \
 		-shared -o $@ $< \
-		-Wl,--kill-at -lkernel32 -ladvapi32
+		-Wl,--kill-at -lkernel32 -ladvapi32 && \
 	$(MINGWSTRIP) $@
-endif
-else # BUILD_UNOWINREG=NO
-$(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll: $(TARFILE_LOCATION)/$(UNOWINREG_DLL)
-	cp $< $@
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
index a7ccf52..531fdbe 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -30,10 +30,11 @@ endif
 
 ifneq ($(SOLAR_JAVA),)
 $(eval $(call gb_Module_add_targets,odk,\
-	CustomTarget_unowinreg \
+	$(if $(filter YESGCC,$(BUILD_UNOWINREG)$(COM)),CustomTarget_unowinreg) \
 	CustomTarget_classes \
 	CustomTarget_javadoc \
 	$(if $(filter WNT,$(OS)),Library_unowinreg) \
+	Package_unowinreg \
 	Zip_uno_loader_classes \
 ))
 endif
diff --git a/odk/Package_unowinreg.mk b/odk/Package_unowinreg.mk
new file mode 100644
index 0000000..0fd0928
--- /dev/null
+++ b/odk/Package_unowinreg.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/.
+#
+
+ifeq ($(BUILD_UNOWINREG),YES)
+ifeq ($(COM),MSC)
+odk_unowinreg_DIR := $(OUTDIR)/bin
+else
+odk_unowinreg_DIR := $(call gb_CustomTarget_get_workdir,odk/unowinreg)
+endif
+odk_unowinreg_FILE := unowinreg.dll
+else # BUILD_UNOWINREG=NO
+odk_unowinreg_DIR := $(TARFILE_LOCATION)
+odk_unowinreg_FILE := $(UNOWINREG_DLL)
+endif
+
+$(eval $(call gb_Package_Package,odk_unowinreg,$(odk_unowinreg_DIR)))
+
+$(eval $(call gb_Package_set_outdir,odk_unowinreg,$(INSTDIR)))
+
+$(eval $(call gb_Package_add_file,odk_unowinreg,$(gb_Package_SDKDIRNAME)/classes/win/unowinreg.dll,$(odk_unowinreg_FILE)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Zip_uno_loader_classes.mk b/odk/Zip_uno_loader_classes.mk
index b22aa4d..6cf0bf1 100644
--- a/odk/Zip_uno_loader_classes.mk
+++ b/odk/Zip_uno_loader_classes.mk
@@ -13,7 +13,6 @@ $(eval $(call gb_Zip_add_commandoptions,uno_loader_classes,-r))
 
 $(eval $(call gb_Zip_add_files,uno_loader_classes,\
 		com/sun/star/lib/loader \
-		win/unowinreg.dll \
 ))
 
 $(call gb_Zip_get_target,uno_loader_classes) : $(call gb_CustomTarget_get_target,odk/odkcommon/classes)
diff --git a/scp2/source/sdkoo/module_sdkoo.scp b/scp2/source/sdkoo/module_sdkoo.scp
index 28ab105..40316cc 100644
--- a/scp2/source/sdkoo/module_sdkoo.scp
+++ b/scp2/source/sdkoo/module_sdkoo.scp
@@ -37,6 +37,7 @@ Module gid_Module_Optional_Sdkoo
         gid_File_Package_odk_bin,
         gid_File_Package_odk_cli,
         gid_File_Package_odk_macosx,
+        gid_File_Package_odk_unowinreg,
         gid_File_Zip_Odkexamples,
         gid_File_Zip_Odkcommon,
         gid_File_Zip_OdkIdl_udkapi,
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
index 1c7f68f..4ad8f95 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -141,6 +141,15 @@ File gid_File_Package_odk_macosx
 End
 #endif
 
+#if defined(SOLAR_JAVA)
+File gid_File_Package_odk_unowinreg
+    TXT_FILE_BODY;
+    Dir = FILELIST_SDK_DIR;
+    Name = "odk_unowinreg.filelist";
+    Styles = (FILELIST,USE_INTERNAL_RIGHTS);
+End
+#endif
+
 File gid_File_Zip_Odkexamples
     TXT_FILE_BODY;
     Dir = FILELIST_SDK_DIR;


More information about the Libreoffice-commits mailing list