1#   -*-makefile-*-
2#   Master/java-tool.make
3#
4#   Master Makefile rules to build Java command-line tools.
5#
6#   Copyright (C) 2001 Free Software Foundation, Inc.
7#
8#   Author:  Nicola Pero <nicola@brainstorm.co.uk>
9#
10#   This file is part of the GNUstep Makefile Package.
11#
12#   This library is free software; you can redistribute it and/or
13#   modify it under the terms of the GNU General Public License
14#   as published by the Free Software Foundation; either version 3
15#   of the License, or (at your option) any later version.
16#
17#   You should have received a copy of the GNU General Public
18#   License along with this library; see the file COPYING.
19#   If not, write to the Free Software Foundation,
20#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22# Why using Java if you can use Objective-C ...
23# Anyway if you really want it, here we go.
24
25#
26# The name of the tools is in the JAVA_TOOL_NAME variable.
27# The main class (the one implementing main) is in the
28# xxx_PRINCIPAL_CLASS variable.
29#
30
31JAVA_TOOL_NAME := $(strip $(JAVA_TOOL_NAME))
32
33ifeq ($(RULES_MAKE_LOADED),)
34include $(GNUSTEP_MAKEFILES)/rules.make
35endif
36
37# TODO: Parallel building.
38internal-all:: $(JAVA_TOOL_NAME:=.all.java_tool.variables)
39
40internal-install:: $(JAVA_TOOL_NAME:=.install.java_tool.variables)
41
42internal-uninstall:: $(JAVA_TOOL_NAME:=.uninstall.java_tool.variables)
43
44internal-clean:: $(JAVA_TOOL_NAME:=.clean.java_tool.variables)
45
46internal-distclean::
47
48JAVA_TOOLS_WITH_SUBPROJECTS = $(strip $(foreach java_tool,$(JAVA_TOOL_NAME),$(patsubst %,$(java_tool),$($(java_tool)_SUBPROJECTS))))
49ifneq ($(JAVA_TOOLS_WITH_SUBPROJECTS),)
50internal-distclean:: $(JAVA_TOOLS_WITH_SUBPROJECTS:=.distclean.java_tool.subprojects)
51endif
52
53$(JAVA_TOOL_NAME):
54	$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory $@.all.java_tool.variables$(END_ECHO_RECURSIVE_MAKE)
55