1#   -*-makefile-*-
2#   Master/bundle.make
3#
4#   Master makefile rules to build GNUstep-based bundles.
5#
6#   Copyright (C) 1997, 2001 Free Software Foundation, Inc.
7#
8#   Author:  Scott Christley <scottc@net-community.com>
9#   Author:  Ovidiu Predescu <ovidiu@net-community.com>
10#   Author:  Nicola Pero <nicola@brainstorm.co.uk>
11#
12#   This file is part of the GNUstep Makefile Package.
13#
14#   This library is free software; you can redistribute it and/or
15#   modify it under the terms of the GNU General Public License
16#   as published by the Free Software Foundation; either version 3
17#   of the License, or (at your option) any later version.
18#
19#   You should have received a copy of the GNU General Public
20#   License along with this library; see the file COPYING.
21#   If not, write to the Free Software Foundation,
22#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24ifeq ($(RULES_MAKE_LOADED),)
25include $(GNUSTEP_MAKEFILES)/rules.make
26endif
27
28BUNDLE_NAME := $(strip $(BUNDLE_NAME))
29
30ifeq ($(GNUSTEP_MAKE_PARALLEL_BUILDING), no)
31
32internal-all:: $(GNUSTEP_OBJ_DIR) $(BUNDLE_NAME:=.all.bundle.variables)
33
34else
35
36internal-all:: $(GNUSTEP_OBJ_DIR)
37	$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
38	internal-master-bundle-all \
39	GNUSTEP_BUILD_DIR="$(GNUSTEP_BUILD_DIR)" \
40	_GNUSTEP_MAKE_PARALLEL=yes$(END_ECHO_RECURSIVE_MAKE)
41
42.PHONY: internal-master-bundle-all
43
44internal-master-bundle-all: $(BUNDLE_NAME:=.all.bundle.variables)
45
46endif
47
48internal-install:: $(BUNDLE_NAME:=.install.bundle.variables)
49
50internal-uninstall:: $(BUNDLE_NAME:=.uninstall.bundle.variables)
51
52_PSWRAP_C_FILES = $(foreach bundle,$(BUNDLE_NAME),$($(bundle)_PSWRAP_FILES:.psw=.c))
53_PSWRAP_H_FILES = $(foreach bundle,$(BUNDLE_NAME),$($(bundle)_PSWRAP_FILES:.psw=.h))
54
55internal-clean::
56	(cd $(GNUSTEP_BUILD_DIR); \
57	rm -rf $(_PSWRAP_C_FILES) $(_PSWRAP_H_FILES) $(addsuffix $(BUNDLE_EXTENSION),$(BUNDLE_NAME)))
58
59internal-distclean::
60
61BUNDLES_WITH_SUBPROJECTS = $(strip $(foreach bundle,$(BUNDLE_NAME),$(patsubst %,$(bundle),$($(bundle)_SUBPROJECTS))))
62
63ifneq ($(BUNDLES_WITH_SUBPROJECTS),)
64internal-clean:: $(BUNDLES_WITH_SUBPROJECTS:=.clean.bundle.subprojects)
65internal-distclean:: $(BUNDLES_WITH_SUBPROJECTS:=.distclean.bundle.subprojects)
66endif
67
68internal-strings:: $(BUNDLE_NAME:=.strings.bundle.variables)
69
70$(BUNDLE_NAME): $(GNUSTEP_OBJ_DIR)
71	$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory $@.all.bundle.variables$(END_ECHO_RECURSIVE_MAKE)
72