]> err.no Git - sope/blob - gnustep-make/Master/tool.make
fixed mapping of 'method' attribute
[sope] / gnustep-make / Master / tool.make
1 #
2 #   Master/tool.make
3 #
4 #   Master Makefile rules to build GNUstep-based command line tools.
5 #
6 #   Copyright (C) 1997, 2001 Free Software Foundation, Inc.
7 #
8 #   Author:  Scott Christley <scottc@net-community.com>
9 #   Author:  Nicola Pero <nicola@brainstorm.co.uk>
10 #
11 #   This file is part of the GNUstep Makefile Package.
12 #
13 #   This library is free software; you can redistribute it and/or
14 #   modify it under the terms of the GNU General Public License
15 #   as published by the Free Software Foundation; either version 2
16 #   of the License, or (at your option) any later version.
17 #   
18 #   You should have received a copy of the GNU General Public
19 #   License along with this library; see the file COPYING.LIB.
20 #   If not, write to the Free Software Foundation,
21 #   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 TOOL_NAME := $(strip $(TOOL_NAME))
24
25 ifeq ($(RULES_MAKE_LOADED),)
26 include $(GNUSTEP_MAKEFILES)/rules.make
27 endif
28
29 internal-all:: $(TOOL_NAME:=.all.tool.variables)
30
31 internal-install:: $(TOOL_NAME:=.install.tool.variables)
32
33 internal-uninstall:: $(TOOL_NAME:=.uninstall.tool.variables)
34
35 internal-clean::
36         rm -rf $(GNUSTEP_OBJ_DIR)
37
38 internal-distclean::
39         (cd $(GNUSTEP_BUILD_DIR); \
40         rm -rf shared_obj static_obj shared_debug_obj shared_profile_obj \
41           static_debug_obj static_profile_obj shared_profile_debug_obj \
42           static_profile_debug_obj)
43
44 TOOLS_WITH_SUBPROJECTS = $(strip $(foreach tool,$(TOOL_NAME),$(patsubst %,$(tool),$($(tool)_SUBPROJECTS))))
45 ifneq ($(TOOLS_WITH_SUBPROJECTS),)
46 internal-clean:: $(TOOLS_WITH_SUBPROJECTS:=.clean.tool.subprojects)
47 internal-distclean:: $(TOOLS_WITH_SUBPROJECTS:=.distclean.tool.subprojects)
48 endif
49
50 # On distclean, we also want to efficiently wipe out the Resources/
51 # directory if (and only if) there are tools for which
52 # xxx_HAS_RESOURCE_BUNDLE=yes
53 TOOLS_WITH_RESOURCE_BUNDLES = $(strip $(foreach tool,$(TOOL_NAME),$($(tool)_HAS_RESOURCE_BUNDLE:yes=$(tool))))
54
55 ifneq ($(TOOLS_WITH_RESOURCE_BUNDLES),)
56 internal-distclean::
57         rm -rf Resources
58 endif
59
60 internal-strings:: $(TOOL_NAME:=.strings.tool.variables)
61
62 $(TOOL_NAME):
63         @$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
64                  $@.all.tool.variables