1# -*-makefile-*- 2# Master/service.make 3# 4# Master Makefile rules to build GNUstep-based services. 5# 6# Copyright (C) 1998, 2001 Free Software Foundation, Inc. 7# 8# Author: Richard Frith-Macdonald <richard@brainstorm.co.uk> 9# Based on the makefiles by Scott Christley. 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 28SERVICE_NAME := $(strip $(SERVICE_NAME)) 29 30ifeq ($(GNUSTEP_MAKE_PARALLEL_BUILDING), no) 31 32internal-all:: $(GNUSTEP_OBJ_DIR) $(SERVICE_NAME:=.all.service.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-service-all \ 39 GNUSTEP_BUILD_DIR="$(GNUSTEP_BUILD_DIR)" \ 40 _GNUSTEP_MAKE_PARALLEL=yes$(END_ECHO_RECURSIVE_MAKE) 41 42.PHONY: internal-master-service-all 43 44internal-master-service-all: $(SERVICE_NAME:=.all.service.variables) 45 46endif 47 48internal-install:: $(SERVICE_NAME:=.install.service.variables) 49 50internal-uninstall:: $(SERVICE_NAME:=.uninstall.service.variables) 51 52_PSWRAP_C_FILES = $(foreach service,$(SERVICE_NAME),$($(service)_PSWRAP_FILES:.psw=.c)) 53_PSWRAP_H_FILES = $(foreach service,$(SERVICE_NAME),$($(service)_PSWRAP_FILES:.psw=.h)) 54 55internal-clean:: 56ifeq ($(GNUSTEP_IS_FLATTENED), no) 57 (cd $(GNUSTEP_BUILD_DIR); \ 58 rm -rf $(_PSWRAP_C_FILES) $(_PSWRAP_H_FILES) *.service/$(GNUSTEP_TARGET_LDIR)) 59else 60 (cd $(GNUSTEP_BUILD_DIR); \ 61 rm -rf $(_PSWRAP_C_FILES) $(_PSWRAP_H_FILES) *.service) 62endif 63 64internal-distclean:: 65ifeq ($(GNUSTEP_IS_FLATTENED), no) 66 (cd $(GNUSTEP_BUILD_DIR); rm -rf *.service) 67endif 68 69SERVICES_WITH_SUBPROJECTS = $(strip $(foreach service,$(SERVICE_NAME),$(patsubst %,$(service),$($(service)_SUBPROJECTS)))) 70ifneq ($(SERVICES_WITH_SUBPROJECTS),) 71internal-clean:: $(SERVICES_WITH_SUBPROJECTS:=.clean.service.subprojects) 72internal-distclean:: $(SERVICES_WITH_SUBPROJECTS:=.distclean.service.subprojects) 73endif 74 75internal-strings:: $(SERVICE_NAME:=.strings.service.variables) 76 77$(SERVICE_NAME): $(GNUSTEP_OBJ_DIR) 78 $(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory $@.all.service.variables$(END_ECHO_RECURSIVE_MAKE) 79 80