2002-11-06 13:22:57 +00:00
|
|
|
# -*-makefile-*-
|
2002-01-30 16:48:58 +00:00
|
|
|
# rules.make
|
|
|
|
#
|
|
|
|
# Makefile rules for the Master invocation.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
|
|
|
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
|
|
|
# Author: Nicola Pero <nicola@brainstorm.co.uk>
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2007-10-30 14:18:41 +00:00
|
|
|
# as published by the Free Software Foundation; either version 3
|
2002-01-30 16:48:58 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
2007-07-13 10:11:48 +00:00
|
|
|
# License along with this library; see the file COPYING.
|
2002-01-30 16:48:58 +00:00
|
|
|
# If not, write to the Free Software Foundation,
|
2005-05-22 03:20:14 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-01-30 16:48:58 +00:00
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
#
|
|
|
|
# Quick explanation -
|
|
|
|
#
|
|
|
|
# Say that you run `make all'. The rule for `all' is below here, and
|
|
|
|
# depends on internal-all. Rules for internal-all are found in
|
|
|
|
# tool.make, library.make etc; there, internal-all will depend on a
|
|
|
|
# list of appropriate %.variables targets, such as
|
|
|
|
# gsdoc.tool.all.variables <which means we need to make `all' for the
|
|
|
|
# `tool' called `gsdoc'> - to process these prerequisites, the
|
|
|
|
# %.variables rule below is used. this rule gets an appropriate make
|
|
|
|
# subprocess going, with the task of building that specific
|
2002-01-30 20:04:36 +00:00
|
|
|
# instance-type-operation prerequisite. The make subprocess will be run
|
2006-09-19 01:04:19 +00:00
|
|
|
# as in `make internal-tool-all GNUSTEP_INSTANCE=gsdoc ...<and other
|
2002-01-30 17:25:53 +00:00
|
|
|
# variables>' and this make subprocess wil find the internal-tool-all
|
|
|
|
# rule in tool.make, and execute that, building the tool.
|
|
|
|
#
|
|
|
|
# Hint: run make with `make -n' to see the recursive method invocations
|
|
|
|
# with the parameters used
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Global targets
|
|
|
|
#
|
|
|
|
|
|
|
|
# The first time you invoke `make', if you have not given a target,
|
2003-10-13 23:23:29 +00:00
|
|
|
# `all' is executed as it is the first one. If a GNUSTEP_BUILD_DIR is
|
|
|
|
# specifed, make sure to create it before anything else is done.
|
|
|
|
ifeq ($(GNUSTEP_BUILD_DIR),.)
|
2002-01-30 17:25:53 +00:00
|
|
|
all:: before-all internal-all after-all
|
2003-10-13 23:23:29 +00:00
|
|
|
else
|
|
|
|
all:: $(GNUSTEP_BUILD_DIR) before-all internal-all after-all
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
|
2014-12-21 07:16:04 +00:00
|
|
|
|
|
|
|
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
$(GNUSTEP_BUILD_DIR):
|
|
|
|
$(ECHO_CREATING)$(MKDIRS) $(GNUSTEP_BUILD_DIR)$(END_ECHO)
|
2003-10-13 23:23:29 +00:00
|
|
|
endif
|
2002-01-30 17:25:53 +00:00
|
|
|
|
2014-12-21 07:16:04 +00:00
|
|
|
|
|
|
|
jar:: all before-jar internal-jar after-jar
|
|
|
|
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
# The rule to create the objects file directory. This should be done
|
|
|
|
# in the Master invocation before any parallel stuff is started (to
|
|
|
|
# avoid race conditions in trying to create it).
|
|
|
|
$(GNUSTEP_OBJ_DIR):
|
|
|
|
$(ECHO_NOTHING)cd $(GNUSTEP_BUILD_DIR); \
|
|
|
|
$(MKDIRS) ./$(GNUSTEP_OBJ_DIR_NAME)$(END_ECHO)
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
# internal-after-install is used by packaging to get the list of files
|
|
|
|
# installed (see rpm.make); it must come after *all* the installation
|
|
|
|
# rules have been executed.
|
|
|
|
# internal-check-installation-permissions comes before everything so
|
2002-12-11 23:04:59 +00:00
|
|
|
# that we run any command if we aren't allowed to install
|
|
|
|
# install depends on all as per GNU/Unix habits, conventions and standards.
|
2005-10-26 14:33:42 +00:00
|
|
|
|
|
|
|
# The very first top-most make invocation we want to have install
|
2016-06-25 07:12:41 +00:00
|
|
|
# depend on all, and distclean depend on clean.
|
|
|
|
# We used to check MAKELEVEL=0 here to
|
2005-10-26 14:33:42 +00:00
|
|
|
# determine if this is the top-most invocation of make, but that does
|
|
|
|
# not work if the top-most invocation of make is done from within a
|
|
|
|
# (non-gnustep-make) makefile itself! So we use a marker variable.
|
|
|
|
# _GNUSTEP_TOP_INVOCATION_DONE is not set the very first / top-most
|
|
|
|
# make invocation , but we set it for all sub-invocations, so all
|
|
|
|
# subinvocations will have it set and we can distinguish them.
|
|
|
|
ifeq ($(_GNUSTEP_TOP_INVOCATION_DONE),)
|
|
|
|
# Top-most invocation of make
|
2016-06-25 07:12:41 +00:00
|
|
|
install:: all \
|
2002-01-30 17:25:53 +00:00
|
|
|
before-install internal-install after-install internal-after-install
|
2005-10-26 14:33:42 +00:00
|
|
|
|
|
|
|
distclean:: clean before-distclean internal-distclean after-distclean
|
|
|
|
|
|
|
|
# Further make invocations will have this variable set
|
|
|
|
export _GNUSTEP_TOP_INVOCATION_DONE = 1
|
2002-01-30 17:25:53 +00:00
|
|
|
else
|
2005-10-26 14:33:42 +00:00
|
|
|
# Sub-invocation of make
|
2009-01-29 00:21:36 +00:00
|
|
|
install:: internal-before-install before-install internal-install after-install internal-after-install
|
2005-10-26 14:33:42 +00:00
|
|
|
|
|
|
|
distclean:: before-distclean internal-distclean after-distclean
|
2002-01-30 17:25:53 +00:00
|
|
|
endif
|
|
|
|
|
2005-10-26 14:33:42 +00:00
|
|
|
|
2009-01-29 00:21:36 +00:00
|
|
|
uninstall:: before-uninstall internal-uninstall after-uninstall internal-after-uninstall
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
clean:: before-clean internal-clean after-clean
|
|
|
|
|
|
|
|
check:: before-check internal-check after-check
|
|
|
|
|
2020-03-06 21:34:06 +00:00
|
|
|
android-check:: before-android-check internal-android-check after-android-check
|
|
|
|
|
2002-10-22 00:35:44 +00:00
|
|
|
strings:: before-strings internal-strings after-strings
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
#
|
|
|
|
# Placeholders for internal targets
|
|
|
|
#
|
|
|
|
|
|
|
|
before-all::
|
|
|
|
|
|
|
|
internal-all::
|
|
|
|
|
|
|
|
after-all::
|
|
|
|
|
2014-12-21 07:16:04 +00:00
|
|
|
before-jar::
|
|
|
|
|
|
|
|
internal-jar::
|
|
|
|
|
|
|
|
after-jar::
|
|
|
|
|
|
|
|
|
2009-01-29 00:21:36 +00:00
|
|
|
# By adding an ADDITIONAL_INSTALL_DIRS variable you can request
|
|
|
|
# additional installation directories to be created before the first
|
|
|
|
# installation target is executed. You can also have xxx_INSTALL_DIRS
|
|
|
|
# for specific instances, which are processed in the Instance
|
|
|
|
# invocation.
|
|
|
|
$(ADDITIONAL_INSTALL_DIRS):
|
|
|
|
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
|
|
|
|
|
|
|
internal-before-install:: $(ADDITIONAL_INSTALL_DIRS)
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
before-install::
|
|
|
|
|
|
|
|
internal-install::
|
|
|
|
|
|
|
|
after-install::
|
|
|
|
|
|
|
|
# The following for exclusive use of packaging code
|
|
|
|
internal-after-install::
|
|
|
|
|
|
|
|
before-uninstall::
|
|
|
|
|
|
|
|
internal-uninstall::
|
|
|
|
|
|
|
|
after-uninstall::
|
|
|
|
|
2009-01-29 00:21:36 +00:00
|
|
|
internal-after-uninstall::
|
|
|
|
ifneq ($(ADDITIONAL_INSTALL_DIRS),)
|
|
|
|
-$(ECHO_NOTHING)for dir in $(ADDITIONAL_INSTALL_DIRS); do \
|
|
|
|
rmdir $$dir ; \
|
|
|
|
done$(END_ECHO)
|
|
|
|
endif
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
before-clean::
|
|
|
|
|
|
|
|
internal-clean::
|
2003-10-13 23:23:29 +00:00
|
|
|
rm -rf $(GNUSTEP_BUILD_DIR)/*~ $(GNUSTEP_BUILD_DIR)/obj
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
after-clean::
|
|
|
|
|
|
|
|
before-distclean::
|
|
|
|
|
|
|
|
internal-distclean::
|
|
|
|
|
|
|
|
after-distclean::
|
|
|
|
|
|
|
|
before-check::
|
|
|
|
|
|
|
|
internal-check::
|
|
|
|
|
|
|
|
after-check::
|
|
|
|
|
2020-03-06 21:34:06 +00:00
|
|
|
before-android-check::
|
|
|
|
|
|
|
|
internal-android-check::
|
|
|
|
|
|
|
|
after-android-check::
|
|
|
|
|
2002-10-22 00:35:44 +00:00
|
|
|
before-strings::
|
|
|
|
|
|
|
|
internal-strings::
|
|
|
|
|
|
|
|
after-strings::
|
|
|
|
|
2002-01-30 17:25:53 +00:00
|
|
|
# declare targets as PHONY
|
|
|
|
|
2006-09-19 00:45:34 +00:00
|
|
|
.PHONY: \
|
|
|
|
all before-all internal-all after-all \
|
2014-12-21 07:16:04 +00:00
|
|
|
jar before-jar internal-jar after-jar \
|
2006-09-19 00:45:34 +00:00
|
|
|
install before-install internal-install after-install \
|
|
|
|
internal-after-install \
|
|
|
|
uninstall before-uninstall internal-uninstall after-uninstall \
|
|
|
|
clean before-clean internal-clean after-clean \
|
|
|
|
distclean before-distclean internal-distclean after-distclean \
|
|
|
|
check before-check internal-check after-check \
|
|
|
|
strings before-strings internal-strings after-strings \
|
|
|
|
build-headers before-build-headers after-build-headers
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
# Prevent make from trying to remove stuff like
|
|
|
|
# libcool.library.all.subprojects thinking that it is a temporary file
|
2006-09-19 01:04:19 +00:00
|
|
|
# FIXME - we really want to declare these as .PHONY, not .PRECIOUS,
|
|
|
|
# we only declare them .PRECIOUS because .PHONY doesn't seem to support
|
|
|
|
# wildcards (FIXME)!
|
2002-10-31 13:59:40 +00:00
|
|
|
.PRECIOUS: %.variables %.subprojects
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
## The magical %.variables rules, thank you GNU make!
|
|
|
|
#
|
|
|
|
|
|
|
|
# The %.variables target has to be called with the name of the actual
|
2002-01-30 20:04:36 +00:00
|
|
|
# instance, followed by the operation, then the makefile fragment to be
|
2002-01-30 17:25:53 +00:00
|
|
|
# called and then the variables word. Suppose for example we build the
|
|
|
|
# library libgmodel, the target should look like:
|
|
|
|
#
|
|
|
|
# libgmodel.all.library.variables
|
|
|
|
#
|
|
|
|
# when the rule is executed, $* is libgmodel.all.libray;
|
2002-01-30 20:04:36 +00:00
|
|
|
# instance will be libgmodel
|
2002-01-30 17:25:53 +00:00
|
|
|
# operation will be all
|
|
|
|
# type will be library
|
|
|
|
#
|
|
|
|
# this rule might be executed many times, for different targets to build.
|
|
|
|
|
|
|
|
# the rule then calls a submake, which runs the real code
|
|
|
|
|
2002-10-31 13:59:40 +00:00
|
|
|
# the following is the code used in %.variables and %.subprojects
|
2002-01-30 20:04:36 +00:00
|
|
|
# to extract the instance, operation and type from the $* (the stem) of the
|
2002-01-30 17:25:53 +00:00
|
|
|
# rule. with GNU make => 3.78, we could define the following as macros
|
|
|
|
# and use $(call ...) to call them; but because we have users who are using
|
|
|
|
# GNU make older than that, we have to manually `paste' this code
|
2002-01-30 20:04:36 +00:00
|
|
|
# wherever we need to access instance or type or operation.
|
2010-02-12 15:57:05 +00:00
|
|
|
# (FIXME: Requiring GNU make >= 3.78 should be OK nowadays)
|
2002-01-30 17:25:53 +00:00
|
|
|
#
|
|
|
|
# Anyway, the following table tells you what these commands do -
|
|
|
|
#
|
2002-01-30 20:04:36 +00:00
|
|
|
# instance=$(basename $(basename $(1)))
|
2002-01-30 17:25:53 +00:00
|
|
|
# operation=$(subst .,,$(suffix $(basename $(1))))
|
|
|
|
# type=$(subst -,_,$(subst .,,$(suffix $(1))))
|
|
|
|
#
|
|
|
|
# It's very important to notice that $(basename $(basename $*)) in
|
2002-01-30 20:04:36 +00:00
|
|
|
# these rules is simply the instance (such as libgmodel).
|
2002-01-30 17:25:53 +00:00
|
|
|
|
2002-10-31 13:59:40 +00:00
|
|
|
# Before building the real thing, we must build the subprojects
|
2002-03-07 16:35:56 +00:00
|
|
|
|
2003-10-13 23:23:29 +00:00
|
|
|
# If we are at the very first make invocation, convert
|
|
|
|
# GNUSTEP_BUILD_DIR into an absolute path. All other make invocations
|
|
|
|
# can then assume it is already an absolute path form, and avoid the
|
|
|
|
# shell invocation to convert into absolute path. Let's avoid the
|
|
|
|
# shell invocation unless strictly necessary - it's slow.
|
|
|
|
ifeq ($(MAKELEVEL),0)
|
|
|
|
ifneq ($(GNUSTEP_BUILD_DIR),.)
|
|
|
|
|
|
|
|
# We can't use ':=' here (which we'd like, since it would guarantee
|
|
|
|
# that the shell command is executed only once) because ':=' would
|
|
|
|
# cause the shell command to be executed immediately, which is *now*
|
|
|
|
# during parsing, before any rule has been executed; in particular,
|
|
|
|
# before the rule which creates GNUSTEP_BUILD_DIR has been executed
|
|
|
|
# (if it had to be executed), and that might cause the 'cd' in the
|
|
|
|
# following shell command to fail. So what we do, is we define this
|
|
|
|
# as a simple variable with '=', which means it will be evaluated
|
|
|
|
# every time it is used, but not before, and then we make sure to
|
|
|
|
# use it as little as possible and only in rules which are executed
|
|
|
|
# after the rule to build GNUSTEP_BUILD_DIR. Please note that in
|
|
|
|
# this setup, *any* reference to this variable causes a slow
|
|
|
|
# subshell invocation. At the moment, it's used when running
|
|
|
|
# the subprojects/variables and when running the aggregate
|
|
|
|
# projects.
|
|
|
|
|
|
|
|
# That makes 1 invocation per type of project per type of target
|
|
|
|
# used in the top-level makefile. For example, if the top-level
|
|
|
|
# makefile includes aggregate.make and documentation.make and does
|
|
|
|
# a make all, we evaluate this variable twice. If it does a make
|
|
|
|
# distclean (which automatically invokes make clean as well) we
|
|
|
|
# evaluate this variable 4 times. All non-top-level make code
|
|
|
|
# is free from overhead.
|
|
|
|
# In the rules which need the ABS_GNUSTEP_BUILD_DIR variable more
|
|
|
|
# than once we copy it into a shell variable and reuse the shell
|
|
|
|
# variable to avoid evaluating ABS_GNUSTEP_BUILD_DIR multiple
|
|
|
|
# times in the same rule.
|
|
|
|
# DO NOT EVER USE THIS VARIABLE UNLESS YOU FULLY UNDERSTAND THE
|
|
|
|
# PERFORMANCE IMPLICATIONS JUST DESCRIBED.
|
|
|
|
ABS_GNUSTEP_BUILD_DIR = $(shell (cd "$(GNUSTEP_BUILD_DIR)"; pwd))
|
|
|
|
else
|
|
|
|
ABS_GNUSTEP_BUILD_DIR = .
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ABS_GNUSTEP_BUILD_DIR = $(strip $(GNUSTEP_BUILD_DIR))
|
|
|
|
endif
|
|
|
|
|
2002-10-17 00:26:08 +00:00
|
|
|
# If you change the subprojects code here, make sure to update the
|
|
|
|
# %.subprojects rule below too! The code from the %.subprojects rule
|
|
|
|
# below is 'inlined' here for speed (so that we don't run a separate
|
|
|
|
# shell just to execute that code).
|
2002-10-31 13:59:40 +00:00
|
|
|
%.variables:
|
2010-02-14 23:13:47 +00:00
|
|
|
$(ECHO_NOTHING_RECURSIVE_MAKE) \
|
2002-10-17 00:26:08 +00:00
|
|
|
instance=$(basename $(basename $*)); \
|
|
|
|
operation=$(subst .,,$(suffix $(basename $*))); \
|
|
|
|
type=$(subst -,_,$(subst .,,$(suffix $*))); \
|
2003-10-13 23:23:29 +00:00
|
|
|
abs_build_dir="$(ABS_GNUSTEP_BUILD_DIR)"; \
|
2002-10-17 00:26:08 +00:00
|
|
|
if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \
|
2010-02-14 23:13:47 +00:00
|
|
|
$(INSIDE_ECHO_MAKING_OPERATION_IN_SUBPROJECTS) \
|
2002-10-17 00:26:08 +00:00
|
|
|
for f in $($(basename $(basename $*))_SUBPROJECTS) __done; do \
|
|
|
|
if [ $$f != __done ]; then \
|
2003-10-13 23:23:29 +00:00
|
|
|
if [ "$${abs_build_dir}" = "." ]; then \
|
|
|
|
gsbuild="."; \
|
|
|
|
else \
|
|
|
|
gsbuild="$${abs_build_dir}/$$f"; \
|
|
|
|
fi; \
|
|
|
|
if [ "$(OWNING_PROJECT_HEADER_DIR_NAME)" = "" ]; then \
|
2002-11-06 13:22:57 +00:00
|
|
|
if [ "$$type" = "framework" ]; then \
|
2005-07-20 16:00:07 +00:00
|
|
|
if [ "$(FRAMEWORK_VERSION_SUPPORT)" = "yes" ]; then \
|
|
|
|
framework_version="$($(basename $(basename $*))_CURRENT_VERSION_NAME)"; \
|
2007-03-13 19:15:19 +00:00
|
|
|
if [ "$$framework_version" = "" ]; then \
|
|
|
|
framework_version="$($(basename $(basename $*))_INTERFACE_VERSION)"; \
|
|
|
|
if [ "$$framework_version" = "" ]; then \
|
|
|
|
framework_version="$(word 1,$(subst ., ,$($(basename $(basename $*))_VERSION)))"; \
|
|
|
|
if [ "$$framework_version" = "" ]; then \
|
2007-04-18 02:46:01 +00:00
|
|
|
framework_version="0"; \
|
2007-03-13 19:15:19 +00:00
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
2005-07-20 16:00:07 +00:00
|
|
|
owning_project_header_dir="../$${instance}.framework/Versions/$${framework_version}/Headers"; \
|
|
|
|
else \
|
|
|
|
owning_project_header_dir="../$${instance}.framework/Headers"; \
|
|
|
|
fi; \
|
2002-11-06 13:22:57 +00:00
|
|
|
else owning_project_header_dir=""; \
|
|
|
|
fi; \
|
|
|
|
else \
|
2003-10-13 23:23:29 +00:00
|
|
|
owning_project_header_dir="../$(OWNING_PROJECT_HEADER_DIR_NAME)"; \
|
2002-11-06 13:22:57 +00:00
|
|
|
fi; \
|
2010-02-14 23:13:47 +00:00
|
|
|
if $(MAKE) -C $$f -f $(MAKEFILE_NAME) $(GNUSTEP_MAKE_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \
|
2003-10-13 23:23:29 +00:00
|
|
|
OWNING_PROJECT_HEADER_DIR_NAME="$${owning_project_header_dir}" \
|
2002-10-17 00:26:08 +00:00
|
|
|
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
2003-10-13 23:23:29 +00:00
|
|
|
GNUSTEP_BUILD_DIR="$$gsbuild" \
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
_GNUSTEP_MAKE_PARALLEL=no \
|
2002-10-17 00:26:08 +00:00
|
|
|
; then \
|
|
|
|
:; \
|
|
|
|
else exit $$?; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi; \
|
2010-02-14 23:13:47 +00:00
|
|
|
$(INSIDE_ECHO_MAKING_OPERATION) \
|
2002-10-17 00:26:08 +00:00
|
|
|
$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
|
|
|
internal-$${type}-$$operation \
|
|
|
|
GNUSTEP_TYPE=$$type \
|
|
|
|
GNUSTEP_INSTANCE=$$instance \
|
2004-05-07 09:33:34 +00:00
|
|
|
GNUSTEP_OPERATION=$$operation \
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
GNUSTEP_BUILD_DIR="$${abs_build_dir}" \
|
2010-02-14 23:13:47 +00:00
|
|
|
_GNUSTEP_MAKE_PARALLEL=no$(END_ECHO_RECURSIVE_MAKE)
|
2002-01-30 17:25:53 +00:00
|
|
|
|
|
|
|
#
|
2002-10-17 00:26:08 +00:00
|
|
|
# This rule provides exactly the same code as the %.variables one with
|
|
|
|
# respect to subprojects; it is available for clean targets when they
|
|
|
|
# want to run make clean in subprojects but do not need a full Instance
|
|
|
|
# invocation. In that case, they can depend on %.subprojects only.
|
2002-01-30 17:25:53 +00:00
|
|
|
#
|
2003-10-13 23:23:29 +00:00
|
|
|
# NB: The OWNING_PROJECT_HEADER_DIR_NAME hack in this rule is sort of
|
2002-11-06 13:22:57 +00:00
|
|
|
# horrible, because it pollutes this general rule with code specific
|
|
|
|
# to the framework implementation (eg, where the framework headers are
|
|
|
|
# located). Still, it's the least evil we could think of at the
|
|
|
|
# moment :-) The framework code is now completely confined into
|
|
|
|
# framework.make makefiles, except for this little hack in here. It
|
|
|
|
# would be nice to remove this hack without loosing functionality (or
|
|
|
|
# polluting other general-purpose makefiles).
|
2002-01-30 17:25:53 +00:00
|
|
|
%.subprojects:
|
2010-02-14 23:13:47 +00:00
|
|
|
$(ECHO_NOTHING_RECURSIVE_MAKE) \
|
2002-01-30 20:04:36 +00:00
|
|
|
instance=$(basename $(basename $*)); \
|
2002-01-30 17:25:53 +00:00
|
|
|
operation=$(subst .,,$(suffix $(basename $*))); \
|
|
|
|
type=$(subst -,_,$(subst .,,$(suffix $*))); \
|
2003-10-13 23:23:29 +00:00
|
|
|
abs_build_dir="$(ABS_GNUSTEP_BUILD_DIR)"; \
|
2002-01-30 17:25:53 +00:00
|
|
|
if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \
|
2010-02-14 23:13:47 +00:00
|
|
|
$(INSIDE_ECHO_MAKING_OPERATION_IN_SUBPROJECTS) \
|
2002-01-30 17:25:53 +00:00
|
|
|
for f in $($(basename $(basename $*))_SUBPROJECTS) __done; do \
|
|
|
|
if [ $$f != __done ]; then \
|
2003-10-13 23:23:29 +00:00
|
|
|
if [ "$${abs_build_dir}" = "." ]; then \
|
|
|
|
gsbuild="."; \
|
|
|
|
else \
|
|
|
|
gsbuild="$${abs_build_dir}/$$f"; \
|
|
|
|
fi; \
|
|
|
|
if [ "$(OWNING_PROJECT_HEADER_DIR_NAME)" = "" ]; then \
|
2002-11-06 13:22:57 +00:00
|
|
|
if [ "$$type" = "framework" ]; then \
|
2005-07-20 16:00:07 +00:00
|
|
|
if [ "$(FRAMEWORK_VERSION_SUPPORT)" = "yes" ]; then \
|
|
|
|
framework_version="$($(basename $(basename $*))_CURRENT_VERSION_NAME)"; \
|
2007-03-13 19:15:19 +00:00
|
|
|
if [ "$$framework_version" = "" ]; then \
|
|
|
|
framework_version="$($(basename $(basename $*))_INTERFACE_VERSION)"; \
|
|
|
|
if [ "$$framework_version" = "" ]; then \
|
|
|
|
framework_version="$(word 1,$(subst ., ,$($(basename $(basename $*))_VERSION)))"; \
|
|
|
|
if [ "$$framework_version" = "" ]; then \
|
2007-04-18 02:46:01 +00:00
|
|
|
framework_version="0"; \
|
2007-03-13 19:15:19 +00:00
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
2005-07-20 16:00:07 +00:00
|
|
|
owning_project_header_dir="../$${instance}.framework/Versions/$${framework_version}/Headers"; \
|
|
|
|
else \
|
|
|
|
owning_project_header_dir="../$${instance}.framework/Headers"; \
|
|
|
|
fi; \
|
2002-11-06 13:22:57 +00:00
|
|
|
else owning_project_header_dir=""; \
|
|
|
|
fi; \
|
|
|
|
else \
|
2003-10-13 23:23:29 +00:00
|
|
|
owning_project_header_dir="../$(OWNING_PROJECT_HEADER_DIR_NAME)"; \
|
2002-11-06 13:22:57 +00:00
|
|
|
fi; \
|
2010-02-14 23:13:47 +00:00
|
|
|
if $(MAKE) -C $$f -f $(MAKEFILE_NAME) $(GNUSTEP_MAKE_NO_PRINT_DIRECTORY_FLAG) --no-keep-going $$operation \
|
2003-10-13 23:23:29 +00:00
|
|
|
OWNING_PROJECT_HEADER_DIR_NAME="$${owning_project_header_dir}" \
|
2002-01-30 17:25:53 +00:00
|
|
|
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
2003-10-13 23:23:29 +00:00
|
|
|
GNUSTEP_BUILD_DIR="$$gsbuild" \
|
Implemented parallel building of multiple instances of apps, bundles, libraries, ctools, clibraries, test-tools, test-apps, test-libraries, services, palettes, gswbundles, gswapps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29577 72102866-910b-0410-8b05-ffd578937521
2010-02-12 10:46:32 +00:00
|
|
|
_GNUSTEP_MAKE_PARALLEL=no \
|
2002-01-30 17:25:53 +00:00
|
|
|
; then \
|
|
|
|
:; \
|
|
|
|
else exit $$?; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
2010-02-14 23:13:47 +00:00
|
|
|
fi$(END_ECHO_RECURSIVE_MAKE)
|
2002-01-30 17:25:53 +00:00
|
|
|
|
2002-01-30 16:48:58 +00:00
|
|
|
#
|
|
|
|
# Now rules for packaging - all automatically included
|
|
|
|
#
|
|
|
|
|
2004-03-29 11:45:40 +00:00
|
|
|
PACKAGE_NAME := $(strip $(PACKAGE_NAME))
|
|
|
|
|
|
|
|
ifeq ($(PACKAGE_NAME),)
|
|
|
|
# Use a default of unnamed-package if nothing better is provided.
|
2006-09-13 04:01:28 +00:00
|
|
|
PACKAGE_NAME = unnamed-package
|
2004-03-29 11:45:40 +00:00
|
|
|
endif
|
|
|
|
|
2004-01-14 19:00:41 +00:00
|
|
|
# For backwards compatibility, take value of PACKAGE_VERSION from
|
|
|
|
# VERSION. New GNUmakefiles should all use the PACKAGE_VERSION
|
|
|
|
# variable rather than the VERSION variable.
|
|
|
|
ifeq ($(PACKAGE_VERSION),)
|
2004-03-29 11:45:40 +00:00
|
|
|
|
2004-01-14 19:00:41 +00:00
|
|
|
PACKAGE_VERSION = $(VERSION)
|
2004-03-29 11:45:40 +00:00
|
|
|
|
|
|
|
# Use a default of 0.0.1 if nothing better is provided.
|
|
|
|
ifeq ($(PACKAGE_VERSION),)
|
|
|
|
PACKAGE_VERSION = 0.0.1
|
|
|
|
endif
|
|
|
|
|
2004-01-14 19:00:41 +00:00
|
|
|
endif
|
|
|
|
|
2002-01-30 16:48:58 +00:00
|
|
|
#
|
|
|
|
# Rules for building source distributions
|
|
|
|
#
|
|
|
|
include $(GNUSTEP_MAKEFILES)/Master/source-distribution.make
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rules for building spec files/file lists for RPMs, and RPMs
|
|
|
|
#
|
|
|
|
include $(GNUSTEP_MAKEFILES)/Master/rpm.make
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rules for building debian/* scripts for DEBs, and DEBs
|
|
|
|
#
|
|
|
|
#include $(GNUSTEP_MAKEFILES)/Master/deb.make <TODO>
|
2007-12-17 19:50:09 +00:00
|
|
|
|