From 7b3f37f885a46e855f8cb16a4106e9c1fdd5c4fe Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Wed, 28 Mar 2012 19:45:12 +0200 Subject: vcl: use CustomTarget makefiles --- vcl/CustomTarget_afm_hash.mk | 36 ++++++++++++++++++++++++++++++++++++ vcl/CustomTarget_kde4_moc.mk | 38 ++++++++++++++++++++++++++++++++++++++ vcl/Library_vcl.mk | 8 ++------ vcl/Library_vclplug_kde4.mk | 7 ++----- vcl/Module_vcl.mk | 8 ++++---- vcl/Package_afmhash.mk | 30 ------------------------------ vcl/Package_kde4moc.mk | 31 ------------------------------- vcl/generic/fontmanager/Makefile | 32 -------------------------------- vcl/unx/kde4/Makefile | 34 ---------------------------------- 9 files changed, 82 insertions(+), 142 deletions(-) create mode 100644 vcl/CustomTarget_afm_hash.mk create mode 100644 vcl/CustomTarget_kde4_moc.mk delete mode 100644 vcl/Package_afmhash.mk delete mode 100644 vcl/Package_kde4moc.mk delete mode 100644 vcl/generic/fontmanager/Makefile delete mode 100644 vcl/unx/kde4/Makefile diff --git a/vcl/CustomTarget_afm_hash.mk b/vcl/CustomTarget_afm_hash.mk new file mode 100644 index 000000000000..57ec6cc8b426 --- /dev/null +++ b/vcl/CustomTarget_afm_hash.mk @@ -0,0 +1,36 @@ +# 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. 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. +# +# The Initial Developer of the Original Code is +# Bjoern Michaelsen (Canonical Ltd.) +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Contributor(s): Jan Holesovsky +# +# 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,vcl/generic/fontmanager,new_style)) + +VCFM := $(call gb_CustomTarget_get_workdir,vcl/generic/fontmanager) + +$(call gb_CustomTarget_get_target,vcl/generic/fontmanager) : $(VCFM)/afm_hash.hpp + +$(VCFM)/afm_hash.hpp : $(SRCDIR)/vcl/generic/fontmanager/afm_keyword_list | $(VCFM)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GPF,1) + $(GPERF) -C -t -l -L C++ -m 20 -Z AfmKeywordHash -k '1,4,6,$$' $< | sed -e "s/(char\*)0/(char\*)0, NOPE/g" | grep -v "^#line" > $@ + +# vim: set noet sw=4: diff --git a/vcl/CustomTarget_kde4_moc.mk b/vcl/CustomTarget_kde4_moc.mk new file mode 100644 index 000000000000..5d0e4b5c63a0 --- /dev/null +++ b/vcl/CustomTarget_kde4_moc.mk @@ -0,0 +1,38 @@ +# -*- 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) 2011 Red Hat, Inc., Caolán McNamara +# (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,vcl/unx/kde4,new_style)) + +VCKM := $(call gb_CustomTarget_get_workdir,vcl/unx/kde4) + +$(call gb_CustomTarget_get_target,vcl/unx/kde4) : $(VCKM)/KDEXLib.moc + +$(VCKM)/KDEXLib.moc : $(SRCDIR)/vcl/unx/kde4/KDEXLib.hxx | $(VCKM)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MOC,1) + $(MOC4) $< -o $@ + +# vim: set noet sw=4: diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index b8863899c8b1..730fdd5b3568 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -43,14 +43,13 @@ $(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.unx)) endif $(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_afmhash)) + +$(eval $(call gb_Library_add_custom_headers,vcl,vcl/generic/fontmanager)) $(eval $(call gb_Library_set_include,vcl,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ - -I$(SRCDIR)/solenv/inc \ $(if $(filter WNTGCC,$(OS)$(COM)),-I$(OUTDIR)/inc/external/wine) \ - -I$(WORKDIR)/CustomTarget/vcl/generic/fontmanager \ )) $(eval $(call gb_Library_add_defs,vcl,\ @@ -451,9 +450,6 @@ $(eval $(call gb_Library_use_externals,vcl,\ endif ifeq ($(GUIBASE),headless) -$(eval $(call gb_Library_add_cxxflags,vcl,\ - $$(FREETYPE_CFLAGS) \ -)) $(eval $(call gb_Library_add_defs,vcl,\ -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk index 9d8dfb32f8b8..9c47d1f7abe7 100644 --- a/vcl/Library_vclplug_kde4.mk +++ b/vcl/Library_vclplug_kde4.mk @@ -28,13 +28,11 @@ $(eval $(call gb_Library_Library,vclplug_kde4)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_kde4moc)) +$(eval $(call gb_Library_add_custom_headers,vclplug_kde4,vcl/unx/kde4)) $(eval $(call gb_Library_set_include,vclplug_kde4,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ - -I$(SRCDIR)/solenv/inc \ - -I$(WORKDIR)/CustomTarget/vcl/unx/kde4 \ )) $(eval $(call gb_Library_set_include,vclplug_kde4,\ @@ -95,10 +93,9 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde4,\ # KDE/Qt consider -Wshadow more trouble than benefit $(eval $(call gb_Library_add_cxxflags,vclplug_kde4,\ - -Wno-shadow \ + -Wno-shadow \ )) - ifeq ($(OS),LINUX) $(eval $(call gb_Library_add_linked_libs,vclplug_kde4,\ dl \ diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index dfd0e34e4dc0..dcde2a62366e 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -30,11 +30,11 @@ $(eval $(call gb_Module_Module,vcl)) $(eval $(call gb_Module_add_targets,vcl,\ + AllLangResTarget_vcl \ + CustomTarget_afm_hash \ Library_vcl \ - StaticLibrary_vclmain \ Package_inc \ - Package_afmhash \ - AllLangResTarget_vcl \ + StaticLibrary_vclmain \ )) ifeq ($(GUIBASE),unx) @@ -62,8 +62,8 @@ $(eval $(call gb_Module_add_targets,vcl,\ endif ifneq ($(ENABLE_KDE4),) $(eval $(call gb_Module_add_targets,vcl,\ + CustomTarget_kde4_moc \ Library_vclplug_kde4 \ - Package_kde4moc \ )) endif endif diff --git a/vcl/Package_afmhash.mk b/vcl/Package_afmhash.mk deleted file mode 100644 index 2aa384b78f10..000000000000 --- a/vcl/Package_afmhash.mk +++ /dev/null @@ -1,30 +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. 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. -# -# The Initial Developer of the Original Code is -# Bjoern Michaelsen (Canonical Ltd.) -# Portions created by the Initial Developer are Copyright (C) 2011 the -# Initial Developer. All Rights Reserved. -# -# Contributor(s): Jan Holesovsky -# -# 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_Package_Package,vcl_afmhash,$(WORKDIR)/CustomTarget/vcl/generic/fontmanager)) -$(eval $(call gb_Package_add_customtarget,vcl_afmhash,vcl/generic/fontmanager)) - -# vim: set noet sw=4 ts=4: diff --git a/vcl/Package_kde4moc.mk b/vcl/Package_kde4moc.mk deleted file mode 100644 index 6924aa07d677..000000000000 --- a/vcl/Package_kde4moc.mk +++ /dev/null @@ -1,31 +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) 2011 Red Hat, Inc., Caolán McNamara -# (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_Package_Package,vcl_kde4moc,$(WORKDIR)/CustomTarget/vcl/unx/kde4)) -$(eval $(call gb_Package_add_customtarget,vcl_kde4moc,vcl/unx/kde4)) - -# vim: set noet sw=4 ts=4: diff --git a/vcl/generic/fontmanager/Makefile b/vcl/generic/fontmanager/Makefile deleted file mode 100644 index 7fb7b0325aea..000000000000 --- a/vcl/generic/fontmanager/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# 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. 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. -# -# The Initial Developer of the Original Code is -# Bjoern Michaelsen (Canonical Ltd.) -# Portions created by the Initial Developer are Copyright (C) 2011 the -# Initial Developer. All Rights Reserved. -# -# Contributor(s): Jan Holesovsky -# -# 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. - -all : afm_hash.hpp - -afm_hash.hpp : $(realpath $(dir $(firstword $(MAKEFILE_LIST))))/afm_keyword_list - $(GPERF) -C -t -l -L C++ -m 20 -Z AfmKeywordHash -k '1,4,6,$$' $< | sed -e "s/(char\*)0/(char\*)0, NOPE/g" | grep -v "^#line" > $@ - -.PHONY : all -# vim: set noet sw=4: diff --git a/vcl/unx/kde4/Makefile b/vcl/unx/kde4/Makefile deleted file mode 100644 index 88cda66fe1da..000000000000 --- a/vcl/unx/kde4/Makefile +++ /dev/null @@ -1,34 +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) 2011 Red Hat, Inc., Caolán McNamara -# (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. - -KDEXLib.cxx : KDEXLib.moc - -KDEXLib.moc : $(realpath $(dir $(firstword $(MAKEFILE_LIST))))/KDEXLib.hxx - $(MOC4) $< -o $@ - -.PHONY : all -# vim: set noet sw=4: -- cgit