1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28# SdiTarget is evil, in that it does not support multiple repositories for now (hardcoded to SRCDIR) 29# Also there is no way to cleanly deliver the generated header to OUTDIR. 30# (This can be workarounded by using gb_Package, but really should not.) 31 32# SdiTarget class 33 34gb_SdiTarget_SVIDLTARGET := $(call gb_Executable_get_target,svidl) 35gb_SdiTarget_SVIDLCOMMAND := $(gb_SdiTarget_SVIDLPRECOMMAND) $(gb_SdiTarget_SVIDLTARGET) 36 37$(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET) 38 $(call gb_Output_announce,$*,$(true),SDI,1) 39 $(call gb_Helper_abbreviate_dirs,\ 40 mkdir -p $(dir $@)) 41 $(call gb_Helper_abbreviate_dirs_native,\ 42 cd $(dir $<) && \ 43 $(gb_SdiTarget_SVIDLCOMMAND) -quiet \ 44 $(INCLUDE) \ 45 -fs$@.hxx \ 46 -fd$@.ilb \ 47 -fl$@.lst \ 48 -fz$@.sid \ 49 -fx$(EXPORTS) \ 50 -fm$@ \ 51 $<) 52 53.PHONY : $(call gb_SdiTarget_get_clean_target,%) 54$(call gb_SdiTarget_get_clean_target,%) : 55 $(call gb_Output_announce,$*,$(false),SDI,1) 56 -$(call gb_Helper_abbreviate_dirs,\ 57 rm -f $(foreach ext,.hxx .ilb .lst .sid,\ 58 $(call gb_SdiTarget_get_target,$*)$(ext)) \ 59 $(call gb_SdiTarget_get_target,$*)) 60 61define gb_SdiTarget_SdiTarget 62$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $$(subst -I. ,-I$$(dir $(SRCDIR)/$(1)) ,$$(SOLARINC)) 63$(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi 64endef 65 66define gb_SdiTarget_set_include 67$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(2) 68 69endef 70 71# vim: set noet sw=4 ts=4: 72