From d5c18a48f82a7336536b6a353f267aefc1142455 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Fri, 30 Mar 2012 20:29:04 +0200 Subject: desktop: use CustomTarget makefile --- desktop/CustomTarget_soffice.mk | 42 +++++++++++++++++++++++++++++++++++++++++ desktop/Module_desktop.mk | 1 + desktop/Package_soffice_sh.mk | 8 +------- desktop/scripts/Makefile | 39 -------------------------------------- 4 files changed, 44 insertions(+), 46 deletions(-) create mode 100644 desktop/CustomTarget_soffice.mk delete mode 100644 desktop/scripts/Makefile (limited to 'desktop') diff --git a/desktop/CustomTarget_soffice.mk b/desktop/CustomTarget_soffice.mk new file mode 100644 index 000000000000..5e12856db345 --- /dev/null +++ b/desktop/CustomTarget_soffice.mk @@ -0,0 +1,42 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,desktop/soffice,new_style)) + +DESO := $(call gb_CustomTarget_get_workdir,desktop/soffice) + +$(call gb_CustomTarget_get_target,desktop/soffice) : $(DESO)/soffice.sh + +$(DESO)/soffice.sh : $(SRCDIR)/desktop/scripts/soffice.sh | $(DESO)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1) +ifneq ($(JITC_PROCESSOR_TYPE),) + sed -e "s/^#@JITC_PROCESSOR_TYPE_EXPORT@/export JITC_PROCESSOR_TYPE=$(JITC_PROCESSOR_TYPE)/" $< > $@ +else + cp $< $@ +endif + +# vim:set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index c861ae80f82b..abafafb3faaf 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ ifneq ($(OS),MACOSX) ifneq ($(OS),WNT) $(eval $(call gb_Module_add_targets,desktop,\ + CustomTarget_soffice \ Package_soffice_sh \ )) endif diff --git a/desktop/Package_soffice_sh.mk b/desktop/Package_soffice_sh.mk index 5cf1df356a58..48a1f9c8faf0 100644 --- a/desktop/Package_soffice_sh.mk +++ b/desktop/Package_soffice_sh.mk @@ -25,14 +25,8 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -$(eval $(call gb_Package_Package,desktop_soffice_sh,$(WORKDIR)/CustomTarget/desktop/scripts)) +$(eval $(call gb_Package_Package,desktop_soffice_sh,$(call gb_CustomTarget_get_workdir,desktop/soffice))) $(eval $(call gb_Package_add_file,desktop_soffice_sh,bin/soffice,soffice.sh)) -$(eval $(call gb_Package_add_customtarget,desktop_soffice_sh,desktop/scripts)) - -$(eval $(call gb_CustomTarget_add_dependencies,desktop/scripts,\ - desktop/scripts/soffice.sh \ -)) - # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/desktop/scripts/Makefile b/desktop/scripts/Makefile deleted file mode 100644 index a654b6b22a6d..000000000000 --- a/desktop/scripts/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2010 Red Hat, Inc., David Tardon -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -soffice.sh : $(SRCDIR)/desktop/scripts/soffice.sh -ifneq ($(JITC_PROCESSOR_TYPE),) - sed -e "s/^#@JITC_PROCESSOR_TYPE_EXPORT@/export JITC_PROCESSOR_TYPE=$(JITC_PROCESSOR_TYPE)/" $< > $@ -else - cp $< $@ -endif - -.DEFAULT_GOAL := all -.PHONY : all -all : soffice.sh - -# vim:set shiftwidth=4 tabstop=4 noexpandtab: -- cgit v1.2.3