summaryrefslogtreecommitdiff
path: root/readlicense_oo
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2012-09-23 09:16:34 +0200
committerDavid Tardon <dtardon@redhat.com>2012-09-23 15:05:49 +0200
commitb21b504022babd2de17dfb91e8dc0a2a5c804354 (patch)
treeb0b1aa273c525ac5386013bfdb8f31e8e76d951a /readlicense_oo
parent3b3c20212e4d50bf70232541fd7e43d516e4db62 (diff)
migrate readlicense_oo to gbuild
Change-Id: I8698d2da889d74a9f806c01f520ac0cbcca67b03
Diffstat (limited to 'readlicense_oo')
-rw-r--r--readlicense_oo/CustomTarget_license.mk24
-rw-r--r--readlicense_oo/CustomTarget_readme.mk75
-rw-r--r--readlicense_oo/Makefile7
-rw-r--r--readlicense_oo/Module_readlicense_oo.mk21
-rw-r--r--readlicense_oo/Package_files.mk25
-rw-r--r--readlicense_oo/Package_license.mk15
-rw-r--r--readlicense_oo/Package_readme.mk18
-rw-r--r--readlicense_oo/docs/readme/makefile.mk43
-rw-r--r--readlicense_oo/makefile.mk45
-rw-r--r--readlicense_oo/prj/build.lst3
-rw-r--r--readlicense_oo/prj/d.lst31
-rw-r--r--readlicense_oo/prj/dmake0
-rw-r--r--readlicense_oo/util/makefile.pmk70
13 files changed, 186 insertions, 191 deletions
diff --git a/readlicense_oo/CustomTarget_license.mk b/readlicense_oo/CustomTarget_license.mk
new file mode 100644
index 000000000000..f6647efa1439
--- /dev/null
+++ b/readlicense_oo/CustomTarget_license.mk
@@ -0,0 +1,24 @@
+# -*- 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,readlicense_oo/license))
+
+readlicense_oo_DIR := $(call gb_CustomTarget_get_workdir,readlicense_oo/license)
+
+$(call gb_CustomTarget_get_target,readlicense_oo/license) : $(readlicense_oo_DIR)/license.txt
+
+$(readlicense_oo_DIR)/license.txt : \
+ $(SRCDIR)/readlicense_oo/txt/license.txt \
+ | $(readlicense_oo_DIR)/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ $(gb_AWK) 'sub("$$","\r")' $< > $@.tmp && mv $@.tmp $@ \
+ )
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/readlicense_oo/CustomTarget_readme.mk b/readlicense_oo/CustomTarget_readme.mk
new file mode 100644
index 000000000000..c9648bb14404
--- /dev/null
+++ b/readlicense_oo/CustomTarget_readme.mk
@@ -0,0 +1,75 @@
+# -*- 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,readlicense_oo/readme))
+
+readlicense_oo_DIR := $(call gb_CustomTarget_get_workdir,readlicense_oo/readme)
+
+# gb_WITH_LANG is empty if --with-lang is not set
+# what we need here is: gb_WITH_LANG_OR_DEFAULT ;-)
+readlicense_oo_LANGS := en-US $(filter-out en-US,$(gb_WITH_LANG))
+
+ifeq ($(GUI),UNX)
+readlicense_oo_READMEs := $(foreach lang,$(readlicense_oo_LANGS),$(readlicense_oo_DIR)/README_$(lang))
+readlicense_oo_README_PATTERN := $(readlicense_oo_DIR)/README_%
+else
+readlicense_oo_READMEs := $(foreach lang,$(readlicense_oo_LANGS),$(readlicense_oo_DIR)/readme_$(lang).txt)
+readlicense_oo_README_PATTERN := $(readlicense_oo_DIR)/readme_%.txt
+endif
+
+readlicense_XRMEXTARGET := $(call gb_Executable_get_target_for_build,xrmex)
+readlicense_XRMEXCOMMAND := $(gb_Helper_set_ld_path) $(readlicense_XRMEXTARGET)
+
+$(call gb_CustomTarget_get_target,readlicense_oo/readme) : $(readlicense_oo_READMEs)
+
+ifeq ($(strip $(gb_WITH_LANG)),)
+readlicense_oo_README_XRM := $(SRCDIR)/readlicense_oo/docs/readme/readme.xrm
+else
+readlicense_oo_README_XRM := $(readlicense_oo_DIR)/readme.xrm
+
+$(readlicense_oo_DIR)/readme.xrm : \
+ $(SRCDIR)/readlicense_oo/docs/readme/readme.xrm \
+ $(readlicense_XRMEXTARGET) \
+ $(gb_SDFLOCATION)/readlicense_oo/docs/readme/localize.sdf \
+ | $(readlicense_oo_DIR)/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XRM,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ $(readlicense_XRMEXCOMMAND) \
+ -p readlicense_oo \
+ -i $< \
+ -o $@ \
+ -m $(gb_SDFLOCATION)/readlicense_oo/docs/readme/localize.sdf \
+ -l all)
+
+endif
+
+$(readlicense_oo_README_PATTERN) : \
+ $(SRCDIR)/readlicense_oo/docs/readme.xsl \
+ $(readlicense_oo_README_XRM) \
+ | $(readlicense_oo_DIR)/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ $(gb_XSLTPROC) --nonet --novalid -o $@.out \
+ --stringparam com1 $(COM) \
+ --stringparam cp1 $(CPUNAME) \
+ --stringparam gui1 $(GUI) \
+ --stringparam lang1 $(word 2,$(subst _, ,$(basename $(notdir $@)))) \
+ --stringparam os1 $(OS) \
+ --stringparam type text \
+ $< \
+ $(readlicense_oo_README_XRM) && \
+ $(if $(filter WNT,$(GUI)) \
+ ,$(gb_AWK) 'sub("$$","\r")' $@.out > $@.tmp && \
+ mv $@.tmp $@ && \
+ rm $@.out \
+ ,mv $@.out $@ \
+ ) \
+ )
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/readlicense_oo/Makefile b/readlicense_oo/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/readlicense_oo/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/readlicense_oo/Module_readlicense_oo.mk b/readlicense_oo/Module_readlicense_oo.mk
new file mode 100644
index 000000000000..4a6c679ff9f2
--- /dev/null
+++ b/readlicense_oo/Module_readlicense_oo.mk
@@ -0,0 +1,21 @@
+# -*- 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_Module_Module,readlicense_oo))
+
+$(eval $(call gb_Module_add_targets,readlicense_oo,\
+ CustomTarget_license \
+ CustomTarget_readme \
+ Package_files \
+ Package_license \
+ Package_readme \
+))
+
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/readlicense_oo/Package_files.mk b/readlicense_oo/Package_files.mk
new file mode 100644
index 000000000000..1cace5a4207f
--- /dev/null
+++ b/readlicense_oo/Package_files.mk
@@ -0,0 +1,25 @@
+# -*- 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,readlicense_oo_files,$(SRCDIR)/readlicense_oo))
+
+# LICENSE (upper case) is copied without EOL conversion from license.txt
+# license.txt is converted, prior to copy, see Package_license.mk
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/osl/LICENSE,txt/license.txt))
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/ure/LICENSE,txt/license.txt))
+
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/NOTICE,txt/NOTICE))
+
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/osl/LICENSE.odt,odt/LICENSE.odt))
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/LICENSE.odt,odt/LICENSE.odt))
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/CREDITS.odt,odt/CREDITS.odt))
+
+$(eval $(call gb_Package_add_file,readlicense_oo_files,bin/THIRDPARTYLICENSEREADME.html,html/THIRDPARTYLICENSEREADME.html))
+
+# vim: set noet sw=4 ts=4:
diff --git a/readlicense_oo/Package_license.mk b/readlicense_oo/Package_license.mk
new file mode 100644
index 000000000000..cdc3b15dc758
--- /dev/null
+++ b/readlicense_oo/Package_license.mk
@@ -0,0 +1,15 @@
+# -*- 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,readlicense_oo_license,$(call gb_CustomTarget_get_workdir,readlicense_oo/license)))
+
+$(eval $(call gb_Package_add_file,readlicense_oo_license,bin/osl/license.txt,license.txt))
+$(eval $(call gb_Package_add_file,readlicense_oo_license,bin/ure/license.txt,license.txt))
+
+# vim: set noet sw=4 ts=4:
diff --git a/readlicense_oo/Package_readme.mk b/readlicense_oo/Package_readme.mk
new file mode 100644
index 000000000000..e1fabb2a5b1e
--- /dev/null
+++ b/readlicense_oo/Package_readme.mk
@@ -0,0 +1,18 @@
+# -*- 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,readlicense_oo_readme_inc,$(call gb_CustomTarget_get_workdir,readlicense_oo/readme)))
+
+$(eval $(call gb_Package_add_files,readlicense_oo_readme_inc,bin/osl,\
+ $(foreach lang,en-US $(filter-out en-US,$(gb_WITH_LANG)),\
+ $(if $(filter UNX,$(GUI)),README_$(lang),readme_$(lang).txt) \
+ ) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/readlicense_oo/docs/readme/makefile.mk b/readlicense_oo/docs/readme/makefile.mk
deleted file mode 100644
index 29128100c5ef..000000000000
--- a/readlicense_oo/docs/readme/makefile.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..
-PRJNAME = readlicense_oo
-TARGET = ooo
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-READMEFILES = \
- $(MISC)$/readme.html \
- $(MISC)$/readme.txt
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
diff --git a/readlicense_oo/makefile.mk b/readlicense_oo/makefile.mk
deleted file mode 100644
index 9d8000fed81d..000000000000
--- a/readlicense_oo/makefile.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-PRJ=.
-PRJNAME=readlicense_oo
-TARGET=source
-
-# ------------------------------------------------------------------
-.INCLUDE: settings.mk
-# ------------------------------------------------------------------
-
-# ------------------------------------------------------------------
-.INCLUDE: target.mk
-# ------------------------------------------------------------------
-
-ALLTAR: $(MISC)/$/license.txt $(MISC)/$/LICENSE \
- $(MISC)/$/NOTICE \
- $(MISC)$/LICENSE.odt $(MISC)$/CREDITS.odt \
- $(MISC)$/THIRDPARTYLICENSEREADME.html
-
-.IF "$(fallbacklicenses)"!=""
-$(fallbacklicenses) : $(SOURCELICENCES)
- @$(ECHON) .
- @$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@
-.ENDIF # "$(fallbacklicenses)"!=""
-
-just_for_nice_optics: $(fallbacklicenses)
- @$(ECHONL)
-
-# for windows, convert linends to DOS
-$(MISC)$/license.txt : txt$/license.txt
- $(PERL) -p -e 's/\r?\n$$/\r\n/' < $< > $@
-# for others just copy
-$(MISC)$/LICENSE : txt$/license.txt
- $(COPY) $< $@
-
-$(MISC)$/SYSLICDEST)$/LICENSE.odt : odt$/LICENSE.odt
- $(COPY) $< $@
-
-# just copy into misc
-$(MISC)$/LICENSE.odt: odt/LICENSE.odt
- $(COPY) odt/LICENSE.odt $@
-$(MISC)$/CREDITS.odt: odt/CREDITS.odt
- $(COPY) odt/CREDITS.odt $@
-$(MISC)$/THIRDPARTYLICENSEREADME.html: html/THIRDPARTYLICENSEREADME.html
- $(COPY) html/THIRDPARTYLICENSEREADME.html $@
-$(MISC)$/NOTICE: txt/NOTICE
- $(COPY) txt/NOTICE $@
diff --git a/readlicense_oo/prj/build.lst b/readlicense_oo/prj/build.lst
index 6d215ee1d7eb..7cfbc48b0a32 100644
--- a/readlicense_oo/prj/build.lst
+++ b/readlicense_oo/prj/build.lst
@@ -1,5 +1,4 @@
ro readlicense_oo : TRANSLATIONS:translations DESKTOP:l10ntools solenv LIBXSLT:libxslt NULL
ro readlicense_oo usr1 - all ro_root NULL
-ro readlicense_oo\docs\readme nmake - all ro_readme NULL
-ro readlicense_oo nmake - all ro_conv NULL
+ro readlicense_oo\prj nmake - all ro_prj NULL
diff --git a/readlicense_oo/prj/d.lst b/readlicense_oo/prj/d.lst
index 97517c59c7de..e69de29bb2d1 100644
--- a/readlicense_oo/prj/d.lst
+++ b/readlicense_oo/prj/d.lst
@@ -1,31 +0,0 @@
-mkdir: %_DEST%\bin\osl
-mkdir: %_DEST%\pck
-
-dos: echo =====================================================================
-dos: echo Delivering LICENSE files
-dos: echo =====================================================================
-..\%__SRC%\misc\LICENSE %_DEST%\bin\osl\LICENSE
-..\%__SRC%\misc\license.txt %_DEST%\bin\osl\license.txt
-..\%__SRC%\misc\LICENSE.odt %_DEST%\bin\osl\LICENSE.odt
-
-..\%__SRC%\misc\LICENSE.odt %_DEST%\bin\LICENSE.odt
-..\%__SRC%\misc\CREDITS.odt %_DEST%\bin\CREDITS.odt
-..\%__SRC%\misc\NOTICE %_DEST%\bin\NOTICE
-
-# URE:
-mkdir: %_DEST%\bin\ure
-..\%__SRC%\misc\LICENSE %_DEST%\bin\ure\LICENSE
-..\%__SRC%\misc\license.txt %_DEST%\bin\ure\license.txt
-
-..\%__SRC%\misc\THIRDPARTYLICENSEREADME.html %_DEST%\bin\THIRDPARTYLICENSEREADME.html
-
-
-dos: echo =====================================================================
-dos: echo Delivering README files
-dos: echo =====================================================================
-
-..\%__SRC%\misc\WNT\readme_*.txt %_DEST%\bin\osl
-..\%__SRC%\misc\WNT\readme_*.html %_DEST%\bin\osl
-..\%__SRC%\misc\UNX\README_* %_DEST%\bin\osl
-..\%__SRC%\misc\UNX\README_*.html %_DEST%\bin\osl
-
diff --git a/readlicense_oo/prj/dmake b/readlicense_oo/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/readlicense_oo/prj/dmake
+++ /dev/null
diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk
deleted file mode 100644
index 7b4836f78173..000000000000
--- a/readlicense_oo/util/makefile.pmk
+++ /dev/null
@@ -1,70 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(GUI)"=="UNX"
-# uppercase and no filename extension for txt
-SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/README_$i)
-.ELSE # "$(GUI)"=="UNX"
-SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/readme_$i.txt)
-.ENDIF # "$(GUI)"=="UNX"
-
-.IF "$(WITH_LANG)"!=""
-MERGEDXRM=$(COMMONMISC)$/$(TARGET)$/readme.xrm
-.ELSE # "$(WITH_LANG)"!=""
-MERGEDXRM=.$/readme.xrm
-.ENDIF # "$(WITH_LANG)"!=""
-
-.INCLUDE : target.mk
-
-ALLTAR : $(SYSTEXTDOCS)
-
-$(COMMONMISC)$/readme.dtd : ..$/readme.dtd
- $(MKDIRHIER) $(MISC)$/$(GUI)
- $(COPY) $< $@
-
-virtual : $(MERGEDXRM) $(COMMONMISC)$/readme.dtd $(PRJ)$/docs/readme.xsl
-
-$(MISC)$/readme_text.xsl : virtual
- $(SED) '' < ..$/readme.xsl > $@
-
-$(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
- @@-$(MKDIRHIER) $(@:d)
- $(XSLTPROC) --nonet --novalid -o $@ \
- --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
- --stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \
- $< $(MERGEDXRM)
-
-.IF "$(GUI)"=="WNT"
- $(PERL) -pi -e 's/\n/\r\n/' $@
-.ENDIF # "$(GUI)"=="WNT"
-
-.IF "$(GUI)"=="UNX"
- chmod g+w $(MISC)$/$(GUI)
-.ENDIF # "$(GUI)"=="UNX"
-