mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Regenerated from the top level makefile
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@11676 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6c070a6ec9
commit
25cdaa5431
2 changed files with 648 additions and 322 deletions
|
@ -1,19 +1,17 @@
|
|||
# -*-makefile-*-
|
||||
# makedoc.make
|
||||
# documentation.make - modified into makedoc.make - see comments
|
||||
# at the beginning of file for what was changed
|
||||
#
|
||||
# Makefile rules to build GNUstep-based texinfo documentation.
|
||||
# Makefile rules to build GNUstep-based documentation.
|
||||
#
|
||||
# Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# Author: Nicola Pero <n.pero@mi.flashnet.it>
|
||||
# Date: November 2000
|
||||
# Changes: Support for installing documentation, and for LaTeX projects
|
||||
#
|
||||
# Author: Adam Fedor <fedor@gnu.org>
|
||||
# Date: Feb 2001
|
||||
# Changes: Modified to build make doc (without installation)
|
||||
# Date: 2000, 2001
|
||||
# Changes: Support for installing documentation, for LaTeX projects,
|
||||
# for Javadoc, lots of other changes and fixes
|
||||
#
|
||||
# This file is part of the GNUstep Makefile Package.
|
||||
#
|
||||
|
@ -31,6 +29,22 @@
|
|||
ifeq ($(DOCUMENTATION_MAKE_LOADED),)
|
||||
DOCUMENTATION_MAKE_LOADED=yes
|
||||
|
||||
##
|
||||
## THE ONLY DIFFERENCE BETWEEN makedoc.make AND THE TOP LEVEL
|
||||
## documentation.make IS THAT THE FOLLOWING LINES ARE COMMENTED OUT
|
||||
##
|
||||
|
||||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
#ifeq ($(RULES_MAKE_LOADED),)
|
||||
#include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
#endif
|
||||
|
||||
##
|
||||
## END OF DIFFERENCE
|
||||
##
|
||||
|
||||
#
|
||||
# The names of the documents are in the DOCUMENT_NAME variable.
|
||||
# These final documents will be generated in info, dvi, ps, and html output.
|
||||
|
@ -71,7 +85,7 @@ ifeq ($(INTERNAL_doc_NAME)$(INTERNAL_textdoc_NAME),)
|
|||
internal-all:: $(DOCUMENT_NAME:=.all.doc.variables) \
|
||||
$(DOCUMENT_TEXT_NAME:=.all.textdoc.variables)
|
||||
|
||||
internal-install:: all $(DOCUMENT_NAME:=.install.doc.variables) \
|
||||
internal-install:: $(DOCUMENT_NAME:=.install.doc.variables) \
|
||||
$(DOCUMENT_TEXT_NAME:=.install.textdoc.variables)
|
||||
|
||||
internal-uninstall:: $(DOCUMENT_NAME:=.uninstall.doc.variables) \
|
||||
|
@ -90,6 +104,20 @@ internal-distclean:: $(DOCUMENT_NAME:=.distclean.doc.variables) \
|
|||
else
|
||||
# This part gets included the second time make is invoked.
|
||||
|
||||
.PHONY: internal-doc-all \
|
||||
internal-textdoc-all \
|
||||
internal-doc-clean \
|
||||
internal-textdoc-clean \
|
||||
internal-doc-distclean \
|
||||
internal-textdoc-distclean \
|
||||
internal-doc-install \
|
||||
internal-textdoc-install \
|
||||
internal-doc-uninstall \
|
||||
internal-textdoc-uninstall \
|
||||
before-$(TARGET)-all \
|
||||
after-$(TARGET)-all \
|
||||
generate-javadoc
|
||||
|
||||
#
|
||||
# Internal targets
|
||||
#
|
||||
|
@ -103,15 +131,15 @@ else
|
|||
#
|
||||
ifneq ($(TEXI_FILES),)
|
||||
|
||||
internal-doc-all:: before-all before-$(TARGET)-all \
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
$(INTERNAL_doc_NAME).info \
|
||||
$(INTERNAL_doc_NAME).ps \
|
||||
$(INTERNAL_doc_NAME)_toc.html \
|
||||
after-$(TARGET)-all after-all
|
||||
after-$(TARGET)-all
|
||||
|
||||
internal-textdoc-all:: before-all before-$(TARGET)-all \
|
||||
internal-textdoc-all:: before-$(TARGET)-all \
|
||||
$(INTERNAL_textdoc_NAME) \
|
||||
after-$(TARGET)-all after-all
|
||||
after-$(TARGET)-all
|
||||
|
||||
$(INTERNAL_doc_NAME).info: $(TEXI_FILES)
|
||||
$(GNUSTEP_MAKEINFO) $(GNUSTEP_MAKEINFO_FLAGS) \
|
||||
|
@ -124,8 +152,12 @@ $(INTERNAL_doc_NAME).ps: $(INTERNAL_doc_NAME).dvi
|
|||
$(GNUSTEP_DVIPS) $(GNUSTEP_DVIPS_FLAGS) \
|
||||
$(INTERNAL_doc_NAME).dvi -o $@
|
||||
|
||||
# Some systems don't have GNUSTEP_TEXI2HTML. Simply don't build the
|
||||
# HTML in these cases - but without aborting compilation. Below, we
|
||||
# don't install the result if it doesn't exist.
|
||||
|
||||
$(INTERNAL_doc_NAME)_toc.html: $(TEXI_FILES)
|
||||
$(GNUSTEP_TEXI2HTML) $(GNUSTEP_TEXI2HTML_FLAGS) \
|
||||
-$(GNUSTEP_TEXI2HTML) $(GNUSTEP_TEXI2HTML_FLAGS) \
|
||||
$(INTERNAL_doc_NAME).texi
|
||||
|
||||
$(INTERNAL_textdoc_NAME): $(TEXI_FILES) $(TEXT_MAIN)
|
||||
|
@ -144,11 +176,16 @@ after-$(TARGET)-all::
|
|||
#
|
||||
ifneq ($(GSDOC_FILES),)
|
||||
|
||||
internal-doc-all:: before-all before-$(TARGET)-all \
|
||||
$(INTERNAL_doc_NAME).html \
|
||||
after-$(TARGET)-all after-all
|
||||
# The only thing we know is that each %.gsdoc file should generate a
|
||||
# %.html file. If any of the %.gsdoc files is newer than a corresponding
|
||||
# %.html file, we rebuild them all.
|
||||
GSDOC_OBJECT_FILES = $(patsubst %.gsdoc,%.html,$(GSDOC_FILES))
|
||||
|
||||
$(INTERNAL_doc_NAME).html: $(GSDOC_FILES)
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
$(GSDOC_OBJECT_FILES) \
|
||||
after-$(TARGET)-all
|
||||
|
||||
$(GSDOC_OBJECT_FILES): $(GSDOC_FILES)
|
||||
gsdoc $(GSDOC_FILES)
|
||||
|
||||
endif # GSDOC_FILES
|
||||
|
@ -171,7 +208,7 @@ $(INTERNAL_doc_NAME).ps: $(INTERNAL_doc_NAME).dvi
|
|||
$(INTERNAL_doc_NAME).ps.gz: $(INTERNAL_doc_NAME).ps
|
||||
gzip $(INTERNAL_doc_NAME).ps -c > $(INTERNAL_doc_NAME).ps.gz
|
||||
|
||||
internal-doc-all:: before-all before-$(TARGET)-all \
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
$(INTERNAL_doc_NAME).ps.gz
|
||||
|
||||
#
|
||||
|
@ -181,17 +218,21 @@ internal-doc-all:: before-all before-$(TARGET)-all \
|
|||
LATEX2HTML = $(shell which latex2html | awk '{print $$1}' | sed -e 's/which://')
|
||||
|
||||
ifneq ($(LATEX2HTML),)
|
||||
HAS_LATEX2HTML = yes
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_LATEX2HTML),yes)
|
||||
internal-doc-all:: $(INTERNAL_doc_NAME).tar.gz
|
||||
|
||||
$(INTERNAL_doc_NAME)/$(INTERNAL_doc_NAME).html: $(INTERNAL_doc_NAME).dvi
|
||||
$(LATEX2HTML) $(INTERNAL_doc_NAME)
|
||||
|
||||
$(INTERNAL_doc_NAME).tar.gz: $(INTERNAL_doc_NAME)/$(INTERNAL_doc_NAME).html
|
||||
$(TAR) cf $(INTERNAL_doc_NAME).tar.gz $(INTERNAL_doc_NAME)
|
||||
$(TAR) cfz $(INTERNAL_doc_NAME).tar.gz $(INTERNAL_doc_NAME)
|
||||
|
||||
endif # LATEX2HTML
|
||||
|
||||
internal-doc-all:: after-$(TARGET)-all after-all
|
||||
internal-doc-all:: after-$(TARGET)-all
|
||||
|
||||
endif # LATEX_FILES
|
||||
|
||||
|
@ -200,21 +241,38 @@ endif # LATEX_FILES
|
|||
#
|
||||
ifneq ($(JAVADOC_FILES),)
|
||||
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
$(INTERNAL_doc_NAME)/index.html \
|
||||
after-$(TARGET)-all
|
||||
|
||||
ifeq ($(JAVADOC_SOURCEPATH),)
|
||||
INTERNAL_JAVADOCFLAGS = -sourcepath ./
|
||||
else
|
||||
INTERNAL_JAVADOCFLAGS = -sourcepath ./:$(strip $(JAVADOC_SOURCEPATH))
|
||||
endif
|
||||
|
||||
# incremental compilation with javadoc is not supported - you can only
|
||||
# build once, or always. by default we build only once - use
|
||||
# `JAVADOC_BUILD_ALWAYS = YES' to force rebuilding it always
|
||||
|
||||
ifneq ($(JAVADOC_BUILD_ALWAYS),YES) # Build only once
|
||||
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
$(INTERNAL_doc_NAME)/index.html \
|
||||
after-$(TARGET)-all
|
||||
$(INTERNAL_doc_NAME)/index.html:
|
||||
$(MKDIRS) $(INTERNAL_doc_NAME); \
|
||||
$(JAVADOC) $(ALL_JAVADOCFLAGS) $(JAVADOC_FILES) -d $(INTERNAL_doc_NAME)
|
||||
|
||||
endif # GSDOC_FILES
|
||||
else # Build always
|
||||
|
||||
internal-doc-all:: before-$(TARGET)-all \
|
||||
generate-javadoc \
|
||||
after-$(TARGET)-all
|
||||
generate-javadoc:
|
||||
$(MKDIRS) $(INTERNAL_doc_NAME); \
|
||||
$(JAVADOC) $(ALL_JAVADOCFLAGS) $(JAVADOC_FILES) -d $(INTERNAL_doc_NAME)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
endif # JAVADOC_FILES
|
||||
|
||||
#
|
||||
# Install and uninstall targets
|
||||
|
@ -223,23 +281,28 @@ endif # GSDOC_FILES
|
|||
#
|
||||
# Installation directory - always created
|
||||
#
|
||||
internal-doc-install:: internal-install-dirs
|
||||
internal-doc-install:: $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
|
||||
internal-install-dirs::
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR):
|
||||
$(MKDIRS) $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
|
||||
#
|
||||
# texi installation
|
||||
#
|
||||
ifneq ($(TEXI_FILES),)
|
||||
|
||||
# NB: Only install HTML if it has been generated
|
||||
internal-doc-install::
|
||||
$(INSTALL_DATA) $(INTERNAL_doc_NAME).ps \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
$(INSTALL_DATA) $(INTERNAL_doc_NAME).info \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
$(INSTALL_DATA) $(INTERNAL_doc_NAME)_*.html \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
internal-doc-uninstall::
|
||||
if [ -f $(INTERNAL_doc_NAME)_toc.html ]; then \
|
||||
$(INSTALL_DATA) $(INTERNAL_doc_NAME)_*.html \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR); \
|
||||
fi
|
||||
|
||||
internal-doc-uninstall::
|
||||
rm -f \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME).ps
|
||||
rm -f \
|
||||
|
@ -253,8 +316,6 @@ endif # TEXI_FILES
|
|||
#
|
||||
ifneq ($(GSDOC_FILES),)
|
||||
|
||||
GSDOC_OBJECT_FILES = $(patsubst %.gsdoc,%.html,$(GSDOC_FILES))
|
||||
|
||||
internal-doc-install::
|
||||
$(INSTALL_DATA) $(GSDOC_OBJECT_FILES) \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
|
@ -275,7 +336,7 @@ internal-doc-uninstall::
|
|||
rm -f \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME).ps
|
||||
|
||||
ifneq ($(LATEX2HTML),)
|
||||
ifeq ($(HAS_LATEX2HTML),yes)
|
||||
internal-doc-install::
|
||||
$(INSTALL_DATA) $(INTERNAL_doc_NAME)/*.html \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
|
@ -307,7 +368,7 @@ endif # JAVADOC_FILES
|
|||
#
|
||||
# text file installation
|
||||
#
|
||||
internal-textdoc-install:: internal-install-dirs
|
||||
internal-textdoc-install:: $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
$(INSTALL_DATA) $(INTERNAL_textdoc_NAME) \
|
||||
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
|
||||
|
||||
|
@ -319,69 +380,53 @@ internal-textdoc-uninstall::
|
|||
# Cleaning targets
|
||||
#
|
||||
internal-doc-clean::
|
||||
rm -f $(INTERNAL_doc_NAME).aux
|
||||
rm -f $(INTERNAL_doc_NAME).cp
|
||||
rm -f $(INTERNAL_doc_NAME).cps
|
||||
rm -f $(INTERNAL_doc_NAME).dvi
|
||||
rm -f $(INTERNAL_doc_NAME).fn
|
||||
rm -f $(INTERNAL_doc_NAME).info
|
||||
rm -f $(INTERNAL_doc_NAME).ky
|
||||
rm -f $(INTERNAL_doc_NAME).log
|
||||
rm -f $(INTERNAL_doc_NAME).pg
|
||||
rm -f $(INTERNAL_doc_NAME).ps
|
||||
rm -f $(INTERNAL_doc_NAME).toc
|
||||
rm -f $(INTERNAL_doc_NAME).tp
|
||||
rm -f $(INTERNAL_doc_NAME).vr
|
||||
rm -f $(INTERNAL_doc_NAME).vrs
|
||||
rm -f $(INTERNAL_doc_NAME)_*.html
|
||||
rm -f $(INTERNAL_doc_NAME).ps.gz
|
||||
rm -f $(INTERNAL_doc_NAME).tar.gz
|
||||
-rm -f $(INTERNAL_doc_NAME)/*
|
||||
@ -rm -f $(INTERNAL_doc_NAME).aux \
|
||||
$(INTERNAL_doc_NAME).cp \
|
||||
$(INTERNAL_doc_NAME).cps \
|
||||
$(INTERNAL_doc_NAME).dvi \
|
||||
$(INTERNAL_doc_NAME).fn \
|
||||
$(INTERNAL_doc_NAME).info \
|
||||
$(INTERNAL_doc_NAME).ky \
|
||||
$(INTERNAL_doc_NAME).log \
|
||||
$(INTERNAL_doc_NAME).pg \
|
||||
$(INTERNAL_doc_NAME).ps \
|
||||
$(INTERNAL_doc_NAME).toc \
|
||||
$(INTERNAL_doc_NAME).tp \
|
||||
$(INTERNAL_doc_NAME).vr \
|
||||
$(INTERNAL_doc_NAME).vrs \
|
||||
$(INTERNAL_doc_NAME)_*.html \
|
||||
$(INTERNAL_doc_NAME).ps.gz \
|
||||
$(INTERNAL_doc_NAME).tar.gz \
|
||||
$(INTERNAL_doc_NAME)/*
|
||||
ifneq ($(GSDOC_FILES),)
|
||||
for i in $(GSDOC_FILES); do \
|
||||
rm -f `basename $$i .gsdoc`.html ; \
|
||||
done
|
||||
@ -rm -f $(GSDOC_OBJECT_FILES)
|
||||
endif
|
||||
ifneq ($(LATEX_FILES),)
|
||||
for i in $(LATEX_FILES); do \
|
||||
rm -f `basename $$i .tex`.aux ; \
|
||||
done
|
||||
@ rm -f *.aux
|
||||
endif
|
||||
ifneq ($(JAVADOC_FILES),)
|
||||
@ -rm -Rf $(INTERNAL_doc_NAME)
|
||||
endif
|
||||
|
||||
internal-textdoc-clean::
|
||||
rm -f $(INTERNAL_textdoc_NAME)
|
||||
ifneq ($(GSDOC_FILES),)
|
||||
for i in $(GSDOC_FILES); do \
|
||||
rm -f `basename $$i .gsdoc`.html ; \
|
||||
done
|
||||
@ rm -f $(INTERNAL_textdoc_NAME)
|
||||
|
||||
ifneq ($(LATEX_FILES),)
|
||||
ifeq ($(HAS_LATEX2HTML),yes)
|
||||
internal-doc-distclean::
|
||||
@ if [ -d "$(INTERNAL_doc_NAME)" ]; then \
|
||||
rm -rf $(INTERNAL_doc_NAME)/; \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(JAVADOC_FILES),)
|
||||
|
||||
internal-doc-distclean::
|
||||
rm -Rf $(INTERNAL_doc_NAME)
|
||||
|
||||
endif # JAVADOC_FILES
|
||||
|
||||
ifneq ($(LATEX_FILES),)
|
||||
|
||||
internal-doc-distclean::
|
||||
rm -Rf *~
|
||||
rm -Rf *.aux
|
||||
else # ! LATEX_FILES
|
||||
internal-doc-distclean::
|
||||
rm -Rf *~
|
||||
endif # LATEX_FILES
|
||||
@ rm -rf $(INTERNAL_doc_NAME)
|
||||
endif
|
||||
|
||||
internal-textdoc-distclean::
|
||||
|
||||
#
|
||||
# Testing targets
|
||||
#
|
||||
internal-doc-check::
|
||||
|
||||
internal-textdoc-check::
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#
|
||||
# rules.make
|
||||
# rules.make - modified into makerules.make - see comments at the end of file
|
||||
# to know about what was changed.
|
||||
#
|
||||
# All of the common makefile rules.
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997, 2001 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.
|
||||
#
|
||||
|
@ -21,40 +23,55 @@
|
|||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# prevent multiple inclusions
|
||||
|
||||
# NB: This file is internally protected against multiple inclusions.
|
||||
# But for perfomance reasons, you might want to check the
|
||||
# RULES_MAKE_LOADED variable yourself and include this file only if it
|
||||
# is empty. That allows make to skip reading the file entirely when it
|
||||
# has already been read. We use this trick for all system makefiles.
|
||||
ifeq ($(RULES_MAKE_LOADED),)
|
||||
RULES_MAKE_LOADED=yes
|
||||
|
||||
# This part is included the first time make is invoked. This part defines the
|
||||
# global targets and the following implicit rule which determines the
|
||||
# TARGET_TYPE of the next thing to be build in the following make invocation
|
||||
# (a library, application, tool etc.), the current name of the target from a
|
||||
# specific library/application/tool/etc list and the OPERATION to be performed
|
||||
# (all, install, clean, distclean etc.).
|
||||
|
||||
# This target has to be called with the name of the actual target, followed
|
||||
# by the operation, then the makefile fragment to be called and then the
|
||||
# variables word. Suppose for example we build the library libgmodel, the
|
||||
# target should look like:
|
||||
#
|
||||
# libgmodel.all.library.variables
|
||||
# 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
|
||||
# target-type-operation prerequisite. The make subprocess will be run
|
||||
# as in `make internal-tool-all INTERNAL_tool_NAME=gsdoc ...<and other
|
||||
# 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
|
||||
#
|
||||
%.variables:
|
||||
@(target=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\1/'`; \
|
||||
operation=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\2/'`; \
|
||||
type=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\3/' | tr - _`; \
|
||||
$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
||||
TARGET_TYPE=$${type} \
|
||||
OPERATION=$${operation} TARGET=$${target} \
|
||||
PROCESS_SECOND_TIME=yes $${target}.build \
|
||||
OBJCFLAGS="$(OBJCFLAGS)" CFLAGS="$(CFLAGS)" \
|
||||
OPTFLAG="$(OPTFLAG)" )
|
||||
|
||||
#
|
||||
# Global targets
|
||||
#
|
||||
|
||||
# The first time you invoke `make', if you have not given a target,
|
||||
# `all' is executed as it is the first one.
|
||||
all:: before-all internal-all after-all
|
||||
|
||||
install:: before-install internal-install after-install
|
||||
# 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
|
||||
# that we don't even run `make all' if we wouldn't be allowed to
|
||||
# install afterwards
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
install:: internal-check-install-permissions all \
|
||||
before-install internal-install after-install internal-after-install
|
||||
else
|
||||
install:: before-install internal-install after-install internal-after-install
|
||||
endif
|
||||
|
||||
uninstall:: before-uninstall internal-uninstall after-uninstall
|
||||
|
||||
|
@ -78,12 +95,51 @@ internal-all::
|
|||
|
||||
after-all::
|
||||
|
||||
# In case of problems, we print a message trying to educate the user
|
||||
# about how to install elsewhere, except if the installation dir is
|
||||
# GNUSTEP_SYSTEM_ROOT, in that case we don't want to suggest to
|
||||
# install the software elsewhere, because it is likely to be system
|
||||
# software like the gnustep-base library. NB: the check of
|
||||
# GNUSTEP_INSTALLATION_DIR against GNUSTEP_SYSTEM_ROOT is not perfect
|
||||
# as /usr/GNUstep/System/ might not match /usr/GNUstep/System but what
|
||||
# we really want to catch is the GNUSTEP_INSTALLATION_DIR =
|
||||
# $(GNUSTEP_SYSTEM_ROOT) command in the makefiles, and the check of
|
||||
# course works with it.
|
||||
internal-check-install-permissions:
|
||||
@if [ -d "$(GNUSTEP_INSTALLATION_DIR)" \
|
||||
-a ! -w "$(GNUSTEP_INSTALLATION_DIR)" ]; then \
|
||||
echo "*ERROR*: the software is configured to install itself into $(GNUSTEP_INSTALLATION_DIR)"; \
|
||||
echo "but you do not have permissions to write in that directory:";\
|
||||
echo "Aborting installation."; \
|
||||
echo ""; \
|
||||
if [ "$(GNUSTEP_INSTALLATION_DIR)" != "$(GNUSTEP_SYSTEM_ROOT)" ]; then \
|
||||
echo "Suggestion: if you can't get permissions to install there, you can try";\
|
||||
echo "to install the software in a different directory by setting";\
|
||||
echo "GNUSTEP_INSTALLATION_DIR. For example, to install into";\
|
||||
echo "$(GNUSTEP_USER_ROOT), which is your own GNUstep directory, just type"; \
|
||||
echo ""; \
|
||||
echo "make install GNUSTEP_INSTALLATION_DIR=\"$(GNUSTEP_USER_ROOT)\""; \
|
||||
echo ""; \
|
||||
echo "You should always be able to install into $(GNUSTEP_USER_ROOT),";\
|
||||
echo "so this might be a good option. The other meaningful values for";\
|
||||
echo "GNUSTEP_INSTALLATION_DIR on your system are:";\
|
||||
echo "$(GNUSTEP_SYSTEM_ROOT) (the System directory)";\
|
||||
echo "$(GNUSTEP_LOCAL_ROOT) (the Local directory)";\
|
||||
echo "$(GNUSTEP_NETWORK_ROOT) (the Network directory)";\
|
||||
echo "but you might need special permissions to install in those directories.";\
|
||||
fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
before-install::
|
||||
|
||||
internal-install::
|
||||
|
||||
after-install::
|
||||
|
||||
# The following for exclusive use of packaging code
|
||||
internal-after-install::
|
||||
|
||||
before-uninstall::
|
||||
|
||||
internal-uninstall::
|
||||
|
@ -93,7 +149,7 @@ after-uninstall::
|
|||
before-clean::
|
||||
|
||||
internal-clean::
|
||||
rm -rf *~
|
||||
rm -rf *~ obj
|
||||
|
||||
after-clean::
|
||||
|
||||
|
@ -111,53 +167,120 @@ after-check::
|
|||
|
||||
# declare targets as PHONY
|
||||
|
||||
.PHONY = all before-all internal-all after-all \
|
||||
.PHONY: all before-all internal-all after-all \
|
||||
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
|
||||
|
||||
ifeq ($(PROCESS_SECOND_TIME),yes)
|
||||
# The following dummy rules are needed for performance - we need to
|
||||
# prevent make from spending time trying to compute how/if to rebuild
|
||||
# the system makefiles! the following rules tell him that these files
|
||||
# are always up-to-date
|
||||
|
||||
ALL_CPPFLAGS = $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS) $(AUXILIARY_CPPFLAGS)
|
||||
$(GNUSTEP_MAKEFILES)/*.make: ;
|
||||
|
||||
$(GNUSTEP_MAKEFILES)/$(GNUSTEP_TARGET_DIR)/config.make: ;
|
||||
|
||||
$(GNUSTEP_MAKEFILES)/Additional/*.make: ;
|
||||
|
||||
#
|
||||
# If this is part of the compilation of a framework,
|
||||
# add -I[../../../etc]derived_src so that the code can include
|
||||
# framework headers simply using `#include <MyFramework/MyHeader.h>'
|
||||
#
|
||||
ifneq ($(FRAMEWORK_NAME),)
|
||||
CURRENT_FRAMEWORK_HEADERS_FLAG = -I$(DERIVED_SOURCES)
|
||||
endif
|
||||
|
||||
#
|
||||
# Auto dependencies
|
||||
#
|
||||
# -MMD -MP tells gcc to generate a .d file for each compiled file,
|
||||
# which includes makefile rules adding dependencies of the compiled
|
||||
# file on all the header files the source file includes ...
|
||||
#
|
||||
# next time `make' is run, we include the .d files for the previous
|
||||
# run (if we find them) ... this automatically adds dependencies on
|
||||
# the appropriate header files
|
||||
#
|
||||
|
||||
# Warning - the following variable name might change
|
||||
ifeq ($(AUTO_DEPENDENCIES),yes)
|
||||
ifeq ($(AUTO_DEPENDENCIES_FLAGS),)
|
||||
AUTO_DEPENDENCIES_FLAGS = -MMD -MP
|
||||
endif
|
||||
endif
|
||||
|
||||
ALL_CPPFLAGS = $(AUTO_DEPENDENCIES_FLAGS) $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS) \
|
||||
$(AUXILIARY_CPPFLAGS)
|
||||
|
||||
ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
|
||||
$(AUXILIARY_OBJCFLAGS) $(ADDITIONAL_INCLUDE_DIRS) \
|
||||
$(AUXILIARY_INCLUDE_DIRS) -I. $(SYSTEM_INCLUDES) \
|
||||
$(GNUSTEP_USER_FRAMEWORKS_HEADERS_FLAG) \
|
||||
$(GNUSTEP_LOCAL_FRAMEWORKS_HEADERS_FLAG) \
|
||||
$(GNUSTEP_NETWORK_FRAMEWORKS_HEADERS_FLAG) \
|
||||
-I$(GNUSTEP_SYSTEM_FRAMEWORKS_HEADERS) \
|
||||
$(AUXILIARY_INCLUDE_DIRS) \
|
||||
$(CURRENT_FRAMEWORK_HEADERS_FLAG) \
|
||||
-I. $(SYSTEM_INCLUDES) \
|
||||
$(GNUSTEP_USER_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_NETWORK_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_HEADERS_FND_FLAG) $(GNUSTEP_HEADERS_GUI_FLAG) \
|
||||
$(GNUSTEP_HEADERS_TARGET_FLAG) $(GNUSTEP_USER_HEADERS_FLAG) \
|
||||
$(GNUSTEP_LOCAL_HEADERS_FLAG) $(GNUSTEP_NETWORK_HEADERS_FLAG) \
|
||||
-I$(GNUSTEP_SYSTEM_HEADERS)
|
||||
$(GNUSTEP_HEADERS_TARGET_FLAGS) $(GNUSTEP_USER_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_HEADERS_FLAGS) $(GNUSTEP_NETWORK_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_HEADERS_FLAGS)
|
||||
|
||||
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
|
||||
$(AUXILIARY_CFLAGS) $(ADDITIONAL_INCLUDE_DIRS) \
|
||||
$(AUXILIARY_INCLUDE_DIRS) -I. $(SYSTEM_INCLUDES) \
|
||||
$(GNUSTEP_USER_FRAMEWORKS_HEADERS_FLAG) \
|
||||
$(GNUSTEP_LOCAL_FRAMEWORKS_HEADERS_FLAG) \
|
||||
$(GNUSTEP_NETWORK_FRAMEWORKS_HEADERS_FLAG) \
|
||||
-I$(GNUSTEP_SYSTEM_FRAMEWORKS_HEADERS) \
|
||||
$(AUXILIARY_INCLUDE_DIRS) \
|
||||
$(CURRENT_FRAMEWORK_HEADERS_FLAG) \
|
||||
-I. $(SYSTEM_INCLUDES) \
|
||||
$(GNUSTEP_USER_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_NETWORK_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_FRAMEWORKS_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_HEADERS_FND_FLAG) $(GNUSTEP_HEADERS_GUI_FLAG) \
|
||||
$(GNUSTEP_HEADERS_TARGET_FLAG) $(GNUSTEP_USER_HEADERS_FLAG) \
|
||||
$(GNUSTEP_LOCAL_HEADERS_FLAG) $(GNUSTEP_NETWORK_HEADERS_FLAG) \
|
||||
-I$(GNUSTEP_SYSTEM_HEADERS)
|
||||
$(GNUSTEP_HEADERS_TARGET_FLAGS) $(GNUSTEP_USER_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_HEADERS_FLAGS) $(GNUSTEP_NETWORK_HEADERS_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_HEADERS_FLAGS)
|
||||
|
||||
ALL_JAVACFLAGS = $(INTERNAL_JAVACFLAGS) $(ADDITIONAL_JAVACFLAGS) \
|
||||
$(AUXILIARY_JAVACFLAGS)
|
||||
# if you need, you can define ADDITIONAL_CCFLAGS to add C++ specific flags
|
||||
ALL_CCFLAGS = $(ADDITIONAL_CCFLAGS) $(AUXILIARY_CCFLAGS)
|
||||
|
||||
ALL_JAVAHFLAGS = $(INTERNAL_JAVAHFLAGS) $(ADDITIONAL_JAVAHFLAGS) \
|
||||
$(AUXILIARY_JAVAHFLAGS)
|
||||
INTERNAL_CLASSPATHFLAGS = -classpath ./$(subst ::,:,:$(strip $(ADDITIONAL_CLASSPATH)):)$(CLASSPATH)
|
||||
|
||||
ALL_JAVADOCFLAGS = $(INTERNAL_JAVADOCFLAGS) $(ADDITIONAL_JAVADOCFLAGS) \
|
||||
$(AUXILIARY_JAVADOCFLAGS)
|
||||
ALL_JAVACFLAGS = $(INTERNAL_CLASSPATHFLAGS) $(INTERNAL_JAVACFLAGS) \
|
||||
$(ADDITIONAL_JAVACFLAGS) $(AUXILIARY_JAVACFLAGS)
|
||||
|
||||
ALL_JAVAHFLAGS = $(INTERNAL_CLASSPATHFLAGS) $(ADDITIONAL_JAVAHFLAGS) \
|
||||
$(AUXILIARY_JAVAHFLAGS)
|
||||
|
||||
ALL_JAVADOCFLAGS = $(INTERNAL_CLASSPATHFLAGS) $(INTERNAL_JAVADOCFLAGS) \
|
||||
$(ADDITIONAL_JAVADOCFLAGS) $(AUXILIARY_JAVADOCFLAGS)
|
||||
|
||||
ALL_LDFLAGS = $(ADDITIONAL_LDFLAGS) $(AUXILIARY_LDFLAGS) $(GUI_LDFLAGS) \
|
||||
$(BACKEND_LDFLAGS) $(SYSTEM_LDFLAGS) $(INTERNAL_LDFLAGS)
|
||||
|
||||
ALL_FRAMEWORK_DIRS = $(ADDITIONAL_FRAMEWORK_DIRS) $(AUXILIARY_FRAMEWORK_DIRS) \
|
||||
$(GNUSTEP_USER_FRAMEWORKS_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_FRAMEWORKS_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_NETWORK_FRAMEWORKS_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_FRAMEWORKS_LIBRARIES_FLAGS)
|
||||
|
||||
ALL_LIB_DIRS = $(ADDITIONAL_LIB_DIRS) $(AUXILIARY_LIB_DIRS) \
|
||||
$(GNUSTEP_USER_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_NETWORK_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_LIBRARIES_FLAGS) \
|
||||
$(SYSTEM_LIB_DIR)
|
||||
|
||||
LIB_DIRS_NO_SYSTEM = $(ADDITIONAL_LIB_DIRS) \
|
||||
$(GNUSTEP_USER_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_LOCAL_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_NETWORK_LIBRARIES_FLAGS) \
|
||||
$(GNUSTEP_SYSTEM_LIBRARIES_FLAGS)
|
||||
|
||||
#
|
||||
# The bundle extension (default is .bundle) is defined by BUNDLE_EXTENSION.
|
||||
#
|
||||
|
@ -165,194 +288,295 @@ ifeq ($(strip $(BUNDLE_EXTENSION)),)
|
|||
BUNDLE_EXTENSION = .bundle
|
||||
endif
|
||||
|
||||
|
||||
# General rules
|
||||
VPATH = .
|
||||
|
||||
.SUFFIXES: .m .c .psw .java .h
|
||||
.SUFFIXES: .m .c .psw .java .h .cpp .cxx .C .cc .cp
|
||||
|
||||
.PRECIOUS: %.c %.h $(GNUSTEP_OBJ_DIR)/%${OEXT}
|
||||
|
||||
#
|
||||
# In exceptional conditions, you might need to want to use different compiler
|
||||
# flags for a file (for example, if a file doesn't compile with optimization
|
||||
# turned on, you might want to compile that single file with optimizations
|
||||
# turned off). gnustep-make allows you to do this - you can specify special
|
||||
# flags to be used when compiling a *specific* file in two ways -
|
||||
#
|
||||
# xxx_FILE_FLAGS (where xxx is the file name, such as main.m)
|
||||
# are special compilation flags to be used when compiling xxx
|
||||
#
|
||||
# xxx_FILE_FILTER_OUT_FLAGS (where xxx is the file name, such as mframe.m)
|
||||
# is a filter-out make pattern of flags to be filtered out
|
||||
# from the compilation flags when compiling xxx.
|
||||
#
|
||||
# Typical examples:
|
||||
#
|
||||
# Disable optimization flags for the file NSInvocation.m:
|
||||
# NSInvocation.m_FILE_FILTER_OUT_FLAGS = -O%
|
||||
#
|
||||
# Disable optimization flags for the same file, and also remove
|
||||
# -fomit-frame-pointer:
|
||||
# NSInvocation.m_FILE_FILTER_OUT_FLAGS = -O% -fomit-frame-pointer
|
||||
#
|
||||
# Force the compiler to warn for #import if used in file file.m:
|
||||
# file.m_FILE_FLAGS = -Wimport
|
||||
# file.m_FILE_FILTER_OUT_FLAGS = -Wno-import
|
||||
#
|
||||
|
||||
# Please don't be scared by the following rules ... In normal
|
||||
# situations, $<_FILTER_OUT_FLAGS is empty, and $<_FILE_FLAGS is empty
|
||||
# as well, so the following rule is simply equivalent to
|
||||
# $(CC) $< -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@
|
||||
# and similarly all the rules below
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.c
|
||||
$(CC) $< -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
||||
$(CC) $< -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_OBJCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.C
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS) \
|
||||
$(ALL_CCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cc
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS) \
|
||||
$(ALL_CCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cpp
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS) \
|
||||
$(ALL_CCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cxx
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS) \
|
||||
$(ALL_CCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cp
|
||||
$(CC) $< -c \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
|
||||
$(ALL_CFLAGS) \
|
||||
$(ALL_CCFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@
|
||||
|
||||
%.class : %.java
|
||||
$(JAVAC) $(ALL_JAVACFLAGS) $<
|
||||
$(JAVAC) \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_JAVACFLAGS)) \
|
||||
$($<_FILE_FLAGS) $<
|
||||
|
||||
# A jni header file which is created using JAVAH
|
||||
# Example of how this rule will be applied:
|
||||
# gnu/gnustep/base/NSObject.h : gnu/gnustep/base/NSObject.java
|
||||
# javah -o gnu/gnustep/base/NSObject.h gnu.gnustep.base.NSObject
|
||||
%.h : %.java
|
||||
$(JAVAH) $(ALL_JAVAHFLAGS) -o $@ $(subst /,.,$*)
|
||||
$(JAVAH) \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_JAVAHFLAGS)) \
|
||||
$($<_FILE_FLAGS) -o $@ $(subst /,.,$*)
|
||||
|
||||
%.c : %.psw
|
||||
pswrap -h $*.h -o $@ $<
|
||||
|
||||
# The magical application rules, thank you GNU make!
|
||||
%.build:
|
||||
@(if [ "$(FRAMEWORK_NAME)" != "" ] && [ "$(OPERATION)" = "all" ] && [ "$(TOOL_NAME)" = "" ]; then \
|
||||
echo Build public headers for $(TARGET_TYPE) $*...; \
|
||||
$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
||||
build-framework-headers \
|
||||
INTERNAL_$(TARGET_TYPE)_NAME=$* \
|
||||
SUBPROJECTS="$($*_SUBPROJECTS)" \
|
||||
TOOLS="$($*_TOOLS)" \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
JAVA_FILES="$($*_JAVA_FILES)" \
|
||||
JAVA_JNI_FILES="$($*_JAVA_JNI_FILES)" \
|
||||
OBJ_FILES="$($*_OBJ_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)" \
|
||||
HEADER_FILES="$($*_HEADER_FILES)" \
|
||||
TEXI_FILES="$($*_TEXI_FILES)" \
|
||||
GSDOC_FILES="$($*_GSDOC_FILES)" \
|
||||
LATEX_FILES="$($*_LATEX_FILES)" \
|
||||
JAVADOC_FILES="$($*_JAVADOC_FILES)" \
|
||||
JAVADOC_SOURCEPATH="$($*_JAVADOC_SOURCEPATH)" \
|
||||
DOC_INSTALL_DIR="$($*_DOC_INSTALL_DIR)" \
|
||||
TEXT_MAIN="$($*_TEXT_MAIN)" \
|
||||
HEADER_FILES_DIR="$($*_HEADER_FILES_DIR)" \
|
||||
HEADER_FILES_INSTALL_DIR="$($*_HEADER_FILES_INSTALL_DIR)" \
|
||||
COMPONENTS="$($*_COMPONENTS)" \
|
||||
LANGUAGES="$($*_LANGUAGES)" \
|
||||
HAS_GSWCOMPONENTS="$($*_HAS_GSWCOMPONENTS)" \
|
||||
GSWAPP_INFO_PLIST="$($*_GSWAPP_INFO_PLIST)" \
|
||||
WEBSERVER_RESOURCE_FILES="$($*_WEBSERVER_RESOURCE_FILES)" \
|
||||
LOCALIZED_WEBSERVER_RESOURCE_FILES="$($*_LOCALIZED_WEBSERVER_RESOURCE_FILES)" \
|
||||
WEBSERVER_RESOURCE_DIRS="$($*_WEBSERVER_RESOURCE_DIRS)" \
|
||||
LOCALIZED_RESOURCE_FILES="$($*_LOCALIZED_RESOURCE_FILES)" \
|
||||
RESOURCE_FILES="$($*_RESOURCE_FILES)" \
|
||||
MAIN_MODEL_FILE="$($*_MAIN_MODEL_FILE)" \
|
||||
RESOURCE_DIRS="$($*_RESOURCE_DIRS)" \
|
||||
BUNDLE_LIBS="$($*_BUNDLE_LIBS) $(BUNDLE_LIBS)" \
|
||||
SERVICE_INSTALL_DIR="$($*_SERVICE_INSTALL_DIR)" \
|
||||
APPLICATION_ICON="$($*_APPLICATION_ICON)" \
|
||||
PALETTE_ICON="$($*_PALETTE_ICON)" \
|
||||
PRINCIPAL_CLASS="$($*_PRINCIPAL_CLASS)" \
|
||||
DLL_DEF="$($*_DLL_DEF)" \
|
||||
ADDITIONAL_INCLUDE_DIRS="$(ADDITIONAL_INCLUDE_DIRS) \
|
||||
$($*_INCLUDE_DIRS)" \
|
||||
ADDITIONAL_GUI_LIBS="$($*_GUI_LIBS) $(ADDITIONAL_GUI_LIBS)" \
|
||||
ADDITIONAL_TOOL_LIBS="$($*_TOOL_LIBS) $(ADDITIONAL_TOOL_LIBS)" \
|
||||
ADDITIONAL_OBJC_LIBS="$($*_OBJC_LIBS) $(ADDITIONAL_OBJC_LIBS)" \
|
||||
ADDITIONAL_LIBRARY_LIBS="$($*_LIBS) $($*_LIBRARY_LIBS) $(ADDITIONAL_LIBRARY_LIBS)" \
|
||||
ADDITIONAL_LIB_DIRS="$($*_LIB_DIRS) $(ADDITIONAL_LIB_DIRS)" \
|
||||
ADDITIONAL_LDFLAGS="$($*_LDFLAGS) $(ADDITIONAL_LDFLAGS)" \
|
||||
LIBRARIES_DEPEND_UPON="$(shell $(WHICH_LIB_SCRIPT) \
|
||||
$(LIB_DIRS_NO_SYSTEM) $($*_LIB_DIRS) $(ADDITIONAL_LIB_DIRS) \
|
||||
$(LIBRARIES_DEPEND_UPON) \
|
||||
$($*_LIBRARIES_DEPEND_UPON) debug=$(debug) profile=$(profile) \
|
||||
shared=$(shared) libext=$(LIBEXT) \
|
||||
shared_libext=$(SHARED_LIBEXT))" \
|
||||
SCRIPTS_DIRECTORY="$($*_SCRIPTS_DIRECTORY)" \
|
||||
CHECK_SCRIPT_DIRS="$($*_SCRIPT_DIRS)"; \
|
||||
if [ "$($*_SUBPROJECTS)" != "" ]; then subprjs="$($*_SUBPROJECTS)"; \
|
||||
else subprjs="__dummy__";\
|
||||
fi;\
|
||||
fi;)
|
||||
@(echo Making $(OPERATION) for $(TARGET_TYPE) $*...; \
|
||||
if [ "$(FRAMEWORK_NAME)" != "" ] && [ "$($*_TOOLS)" != "" ] && [ "$(OPERATION)" != "build-framework-headers" ]; then tools="$($*_TOOLS)"; \
|
||||
else tools="__dummy__";\
|
||||
fi;\
|
||||
if [ "$$tools" != "__dummy__" ]; then \
|
||||
for f in $$tools; do \
|
||||
mf=$(MAKEFILE_NAME); \
|
||||
if [ ! -f $$f/$$mf -a -f $$f/Makefile ]; then \
|
||||
mf=Makefile; \
|
||||
echo "WARNING: No $(MAKEFILE_NAME) found for tool $ff; using 'Makefile'"; \
|
||||
fi; \
|
||||
if $(MAKE) -C $$f -f $$mf --no-keep-going $(OPERATION) \
|
||||
FRAMEWORK_NAME="$(FRAMEWORK_NAME)" \
|
||||
FRAMEWORK_VERSION_DIR_NAME="../$(FRAMEWORK_VERSION_DIR_NAME)" \
|
||||
FRAMEWORK_OPERATION="$(OPERATION)" \
|
||||
TOOL_OPERATION="$(OPERATION)" \
|
||||
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
||||
SUBPROJECT_ROOT_DIR="$(SUBPROJECT_ROOT_DIR)/$$f" \
|
||||
; then \
|
||||
:; \
|
||||
else exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
fi; \
|
||||
if [ "$($*_SUBPROJECTS)" != "" ]; then subprjs="$($*_SUBPROJECTS)"; \
|
||||
else subprjs="__dummy__";\
|
||||
fi;\
|
||||
if [ "$$subprjs" != "__dummy__" ]; then \
|
||||
for f in $$subprjs; do \
|
||||
mf=$(MAKEFILE_NAME); \
|
||||
if [ ! -f $$f/$$mf -a -f $$f/Makefile ]; then \
|
||||
mf=Makefile; \
|
||||
echo "WARNING: No $(MAKEFILE_NAME) found for subproject $ff; using 'Makefile'"; \
|
||||
fi; \
|
||||
if $(MAKE) -C $$f -f $$mf --no-keep-going $(OPERATION) \
|
||||
FRAMEWORK_NAME="$(FRAMEWORK_NAME)" \
|
||||
FRAMEWORK_VERSION_DIR_NAME="../$(FRAMEWORK_VERSION_DIR_NAME)" \
|
||||
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
||||
SUBPROJECT_ROOT_DIR="$(SUBPROJECT_ROOT_DIR)/$$f" \
|
||||
; then \
|
||||
:; \
|
||||
else exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
fi; \
|
||||
$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
||||
internal-$(TARGET_TYPE)-$(OPERATION) \
|
||||
INTERNAL_$(TARGET_TYPE)_NAME=$* \
|
||||
SUBPROJECTS="$($*_SUBPROJECTS)" \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
JAVA_FILES="$($*_JAVA_FILES)" \
|
||||
JAVA_JNI_FILES="$($*_JAVA_JNI_FILES)" \
|
||||
OBJ_FILES="$($*_OBJ_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)" \
|
||||
HEADER_FILES="$($*_HEADER_FILES)" \
|
||||
TEXI_FILES="$($*_TEXI_FILES)" \
|
||||
GSDOC_FILES="$($*_GSDOC_FILES)" \
|
||||
LATEX_FILES="$($*_LATEX_FILES)" \
|
||||
JAVADOC_FILES="$($*_JAVADOC_FILES)" \
|
||||
JAVADOC_SOURCEPATH="$($*_JAVADOC_SOURCEPATH)" \
|
||||
DOC_INSTALL_DIR="$($*_DOC_INSTALL_DIR)" \
|
||||
TEXT_MAIN="$($*_TEXT_MAIN)" \
|
||||
HEADER_FILES_DIR="$($*_HEADER_FILES_DIR)" \
|
||||
HEADER_FILES_INSTALL_DIR="$($*_HEADER_FILES_INSTALL_DIR)" \
|
||||
COMPONENTS="$($*_COMPONENTS)" \
|
||||
LANGUAGES="$($*_LANGUAGES)" \
|
||||
HAS_GSWCOMPONENTS="$($*_HAS_GSWCOMPONENTS)" \
|
||||
GSWAPP_INFO_PLIST="$($*_GSWAPP_INFO_PLIST)" \
|
||||
WEBSERVER_RESOURCE_FILES="$($*_WEBSERVER_RESOURCE_FILES)" \
|
||||
LOCALIZED_WEBSERVER_RESOURCE_FILES="$($*_LOCALIZED_WEBSERVER_RESOURCE_FILES)" \
|
||||
WEBSERVER_RESOURCE_DIRS="$($*_WEBSERVER_RESOURCE_DIRS)" \
|
||||
LOCALIZED_RESOURCE_FILES="$($*_LOCALIZED_RESOURCE_FILES)" \
|
||||
RESOURCE_FILES="$($*_RESOURCE_FILES)" \
|
||||
MAIN_MODEL_FILE="$($*_MAIN_MODEL_FILE)" \
|
||||
RESOURCE_DIRS="$($*_RESOURCE_DIRS)" \
|
||||
BUNDLE_LIBS="$($*_BUNDLE_LIBS) $(BUNDLE_LIBS)" \
|
||||
SERVICE_INSTALL_DIR="$($*_SERVICE_INSTALL_DIR)" \
|
||||
APPLICATION_ICON="$($*_APPLICATION_ICON)" \
|
||||
PALETTE_ICON="$($*_PALETTE_ICON)" \
|
||||
PRINCIPAL_CLASS="$($*_PRINCIPAL_CLASS)" \
|
||||
DLL_DEF="$($*_DLL_DEF)" \
|
||||
ADDITIONAL_INCLUDE_DIRS="$(ADDITIONAL_INCLUDE_DIRS) \
|
||||
$($*_INCLUDE_DIRS)" \
|
||||
ADDITIONAL_GUI_LIBS="$($*_GUI_LIBS) $(ADDITIONAL_GUI_LIBS)" \
|
||||
ADDITIONAL_TOOL_LIBS="$($*_TOOL_LIBS) $(ADDITIONAL_TOOL_LIBS)" \
|
||||
ADDITIONAL_OBJC_LIBS="$($*_OBJC_LIBS) $(ADDITIONAL_OBJC_LIBS)" \
|
||||
ADDITIONAL_LIBRARY_LIBS="$($*_LIBS) $($*_LIBRARY_LIBS) $(ADDITIONAL_LIBRARY_LIBS)" \
|
||||
ADDITIONAL_LIB_DIRS="$($*_LIB_DIRS) $(ADDITIONAL_LIB_DIRS)" \
|
||||
ADDITIONAL_LDFLAGS="$($*_LDFLAGS) $(ADDITIONAL_LDFLAGS)" \
|
||||
LIBRARIES_DEPEND_UPON="$(shell $(WHICH_LIB_SCRIPT) \
|
||||
$(LIB_DIRS_NO_SYSTEM) $($*_LIB_DIRS) $(ADDITIONAL_LIB_DIRS) \
|
||||
$(LIBRARIES_DEPEND_UPON) \
|
||||
$($*_LIBRARIES_DEPEND_UPON) debug=$(debug) profile=$(profile) \
|
||||
shared=$(shared) libext=$(LIBEXT) \
|
||||
shared_libext=$(SHARED_LIBEXT))" \
|
||||
SCRIPTS_DIRECTORY="$($*_SCRIPTS_DIRECTORY)" \
|
||||
CHECK_SCRIPT_DIRS="$($*_SCRIPT_DIRS)" \
|
||||
)
|
||||
|
||||
# Prevent make from trying to remove stuff like
|
||||
# libcool.library.all.subprojects thinking that it is a temporary file
|
||||
.PRECIOUS: %.variables %.tools %.subprojects
|
||||
|
||||
#
|
||||
## The magical %.variables rules, thank you GNU make!
|
||||
#
|
||||
|
||||
# The %.variables target has to be called with the name of the actual
|
||||
# target, followed by the operation, then the makefile fragment to be
|
||||
# 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;
|
||||
# target will be libgmodel
|
||||
# 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
|
||||
|
||||
# the following is the code used in %.variables, %.tools and %.subprojects
|
||||
# to extract the target, operation and type from the $* (the stem) of the
|
||||
# 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
|
||||
# wherever we need to access target or type or operation.
|
||||
#
|
||||
# Anyway, the following table tells you what these commands do -
|
||||
#
|
||||
# target=$(basename $(basename $(1)))
|
||||
# operation=$(subst .,,$(suffix $(basename $(1))))
|
||||
# type=$(subst -,_,$(subst .,,$(suffix $(1))))
|
||||
#
|
||||
# It's very important to notice that $(basename $(basename $*)) in
|
||||
# these rules is simply the target (such as libgmodel).
|
||||
|
||||
# Before building the real thing, we must build framework tools if
|
||||
# any, then subprojects (FIXME - not sure - at what stage should we
|
||||
# build framework tools ? perhaps after the framework so we can link
|
||||
# with it ?)
|
||||
%.variables: %.tools %.subprojects
|
||||
@ \
|
||||
target=$(basename $(basename $*)); \
|
||||
operation=$(subst .,,$(suffix $(basename $*))); \
|
||||
type=$(subst -,_,$(subst .,,$(suffix $*))); \
|
||||
echo Making $$operation for $$type $$target...; \
|
||||
$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
||||
internal-$${type}-$$operation \
|
||||
INTERNAL_$${type}_NAME=$$target \
|
||||
TARGET=$$target \
|
||||
_SUBPROJECTS="$($(basename $(basename $*))_SUBPROJECTS)" \
|
||||
OBJC_FILES="$($(basename $(basename $*))_OBJC_FILES)" \
|
||||
C_FILES="$($(basename $(basename $*))_C_FILES)" \
|
||||
CC_FILES="$($(basename $(basename $*))_CC_FILES)" \
|
||||
JAVA_FILES="$($(basename $(basename $*))_JAVA_FILES)" \
|
||||
JAVA_JNI_FILES="$($(basename $(basename $*))_JAVA_JNI_FILES)" \
|
||||
OBJ_FILES="$($(basename $(basename $*))_OBJ_FILES)" \
|
||||
PSWRAP_FILES="$($(basename $(basename $*))_PSWRAP_FILES)" \
|
||||
HEADER_FILES="$($(basename $(basename $*))_HEADER_FILES)" \
|
||||
TEXI_FILES="$($(basename $(basename $*))_TEXI_FILES)" \
|
||||
GSDOC_FILES="$($(basename $(basename $*))_GSDOC_FILES)" \
|
||||
LATEX_FILES="$($(basename $(basename $*))_LATEX_FILES)" \
|
||||
JAVADOC_FILES="$($(basename $(basename $*))_JAVADOC_FILES)" \
|
||||
JAVADOC_SOURCEPATH="$($(basename $(basename $*))_JAVADOC_SOURCEPATH)" \
|
||||
DOC_INSTALL_DIR="$($(basename $(basename $*))_DOC_INSTALL_DIR)" \
|
||||
TEXT_MAIN="$($(basename $(basename $*))_TEXT_MAIN)" \
|
||||
HEADER_FILES_DIR="$($(basename $(basename $*))_HEADER_FILES_DIR)" \
|
||||
HEADER_FILES_INSTALL_DIR="$($(basename $(basename $*))_HEADER_FILES_INSTALL_DIR)" \
|
||||
COMPONENTS="$($(basename $(basename $*))_COMPONENTS)" \
|
||||
LANGUAGES="$($(basename $(basename $*))_LANGUAGES)" \
|
||||
HAS_GSWCOMPONENTS="$($(basename $(basename $*))_HAS_GSWCOMPONENTS)" \
|
||||
GSWAPP_INFO_PLIST="$($(basename $(basename $*))_GSWAPP_INFO_PLIST)" \
|
||||
WEBSERVER_RESOURCE_FILES="$($(basename $(basename $*))_WEBSERVER_RESOURCE_FILES)" \
|
||||
LOCALIZED_WEBSERVER_RESOURCE_FILES="$($(basename $(basename $*))_LOCALIZED_WEBSERVER_RESOURCE_FILES)" \
|
||||
WEBSERVER_RESOURCE_DIRS="$($(basename $(basename $*))_WEBSERVER_RESOURCE_DIRS)" \
|
||||
LOCALIZED_RESOURCE_FILES="$($(basename $(basename $*))_LOCALIZED_RESOURCE_FILES)" \
|
||||
RESOURCE_FILES="$($(basename $(basename $*))_RESOURCE_FILES)" \
|
||||
MAIN_MODEL_FILE="$($(basename $(basename $*))_MAIN_MODEL_FILE)" \
|
||||
RESOURCE_DIRS="$($(basename $(basename $*))_RESOURCE_DIRS)" \
|
||||
BUNDLE_LIBS="$($(basename $(basename $*))_BUNDLE_LIBS) $(BUNDLE_LIBS)" \
|
||||
SERVICE_INSTALL_DIR="$($(basename $(basename $*))_SERVICE_INSTALL_DIR)" \
|
||||
APPLICATION_ICON="$($(basename $(basename $*))_APPLICATION_ICON)" \
|
||||
PALETTE_ICON="$($(basename $(basename $*))_PALETTE_ICON)" \
|
||||
PRINCIPAL_CLASS="$($(basename $(basename $*))_PRINCIPAL_CLASS)" \
|
||||
DLL_DEF="$($(basename $(basename $*))_DLL_DEF)" \
|
||||
ADDITIONAL_INCLUDE_DIRS="$(ADDITIONAL_INCLUDE_DIRS) \
|
||||
$($(basename $(basename $*))_INCLUDE_DIRS)" \
|
||||
ADDITIONAL_GUI_LIBS="$($(basename $(basename $*))_GUI_LIBS) \
|
||||
$(ADDITIONAL_GUI_LIBS)" \
|
||||
ADDITIONAL_TOOL_LIBS="$($(basename $(basename $*))_TOOL_LIBS) \
|
||||
$(ADDITIONAL_TOOL_LIBS)" \
|
||||
ADDITIONAL_OBJC_LIBS="$($(basename $(basename $*))_OBJC_LIBS) \
|
||||
$(ADDITIONAL_OBJC_LIBS)" \
|
||||
ADDITIONAL_LIBRARY_LIBS="$($(basename $(basename $*))_LIBS) \
|
||||
$($(basename $(basename $*))_LIBRARY_LIBS) \
|
||||
$(ADDITIONAL_LIBRARY_LIBS)" \
|
||||
ADDITIONAL_LIB_DIRS="$($(basename $(basename $*))_LIB_DIRS) \
|
||||
$(ADDITIONAL_LIB_DIRS)" \
|
||||
ADDITIONAL_LDFLAGS="$($(basename $(basename $*))_LDFLAGS) \
|
||||
$(ADDITIONAL_LDFLAGS)" \
|
||||
ADDITIONAL_CLASSPATH="$($(basename $(basename $*))_CLASSPATH) \
|
||||
$(ADDITIONAL_CLASSPATH)" \
|
||||
LIBRARIES_DEPEND_UPON="$(shell $(WHICH_LIB_SCRIPT) \
|
||||
$($(basename $(basename $*))_LIB_DIRS) $(ADDITIONAL_LIB_DIRS) \
|
||||
$(ALL_LIB_DIRS) $(LIBRARIES_DEPEND_UPON) \
|
||||
$($(basename $(basename $*))_LIBRARIES_DEPEND_UPON) debug=$(debug) \
|
||||
profile=$(profile) shared=$(shared) libext=$(LIBEXT) \
|
||||
shared_libext=$(SHARED_LIBEXT))" \
|
||||
SCRIPTS_DIRECTORY="$($(basename $(basename $*))_SCRIPTS_DIRECTORY)" \
|
||||
CHECK_SCRIPT_DIRS="$($(basename $(basename $*))_SCRIPT_DIRS)"
|
||||
|
||||
|
||||
ifneq ($(FRAMEWORK_NAME),)
|
||||
#
|
||||
# This rule is executed only for frameworks to build the framework tools.
|
||||
# It is currently executed before %.subprojects (FIXME order).
|
||||
#
|
||||
%.tools:
|
||||
@ \
|
||||
target=$(basename $(basename $*)); \
|
||||
operation=$(subst .,,$(suffix $(basename $*))); \
|
||||
type=$(subst -,_,$(subst .,,$(suffix $*))); \
|
||||
if [ "$$operation" != "build-headers" ]; then \
|
||||
if [ "$($(basename $(basename $*))_TOOLS)" != "" ]; then \
|
||||
echo Building tools for $$type $$target...; \
|
||||
for f in $($(basename $(basename $*))_TOOLS) __done; do \
|
||||
if [ $$f != __done ]; then \
|
||||
mf=$(MAKEFILE_NAME); \
|
||||
if [ ! -f $$f/$$mf -a -f $$f/Makefile ]; then \
|
||||
mf=Makefile; \
|
||||
echo "WARNING: No $(MAKEFILE_NAME) found for tool $$f; using 'Makefile'"; \
|
||||
fi; \
|
||||
if $(MAKE) -C $$f -f $$mf --no-keep-going $$operation \
|
||||
FRAMEWORK_NAME="$(FRAMEWORK_NAME)" \
|
||||
FRAMEWORK_VERSION_DIR_NAME="../$(FRAMEWORK_VERSION_DIR_NAME)" \
|
||||
FRAMEWORK_OPERATION="$$operation" \
|
||||
TOOL_OPERATION="$$operation" \
|
||||
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
||||
SUBPROJECT_ROOT_DIR="$(SUBPROJECT_ROOT_DIR)/$$f" \
|
||||
; then \
|
||||
:; \
|
||||
else exit $$?; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
fi; \
|
||||
fi
|
||||
else # no FRAMEWORK
|
||||
%.tools: ;
|
||||
endif # end of FRAMEWORK code
|
||||
|
||||
#
|
||||
# This rule is executed before %.variables to process (eventual) subprojects
|
||||
#
|
||||
%.subprojects:
|
||||
@ \
|
||||
target=$(basename $(basename $*)); \
|
||||
operation=$(subst .,,$(suffix $(basename $*))); \
|
||||
type=$(subst -,_,$(subst .,,$(suffix $*))); \
|
||||
if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \
|
||||
echo Making $$operation in subprojects of $$type $$target...; \
|
||||
for f in $($(basename $(basename $*))_SUBPROJECTS) __done; do \
|
||||
if [ $$f != __done ]; then \
|
||||
mf=$(MAKEFILE_NAME); \
|
||||
if [ ! -f $$f/$$mf -a -f $$f/Makefile ]; then \
|
||||
mf=Makefile; \
|
||||
echo "WARNING: No $(MAKEFILE_NAME) found for subproject $$f; using 'Makefile'"; \
|
||||
fi; \
|
||||
if $(MAKE) -C $$f -f $$mf --no-keep-going $$operation \
|
||||
FRAMEWORK_NAME="$(FRAMEWORK_NAME)" \
|
||||
FRAMEWORK_VERSION_DIR_NAME="../$(FRAMEWORK_VERSION_DIR_NAME)" \
|
||||
DERIVED_SOURCES="../$(DERIVED_SOURCES)" \
|
||||
SUBPROJECT_ROOT_DIR="$(SUBPROJECT_ROOT_DIR)/$$f" \
|
||||
; then \
|
||||
:; \
|
||||
else exit $$?; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
#
|
||||
# The list of Objective-C source files to be compiled
|
||||
|
@ -361,6 +585,9 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
|||
# The list of C source files to be compiled
|
||||
# are in the C_FILES variable.
|
||||
#
|
||||
# The list of C++ source files to be compiled
|
||||
# are in the CC_FILES variable.
|
||||
#
|
||||
# The list of PSWRAP source files to be compiled
|
||||
# are in the PSWRAP_FILES variable.
|
||||
#
|
||||
|
@ -371,22 +598,25 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
|||
# are in the JAVA_JNI_FILES variable.
|
||||
#
|
||||
|
||||
#
|
||||
# Please note the subtle difference:
|
||||
#
|
||||
# At `user' level (ie, in the user's GNUmakefile),
|
||||
# the SUBPROJECTS variable is reserved for use with aggregate.make;
|
||||
# the xxx_SUBPROJECTS variable is reserved for use with subproject.make.
|
||||
#
|
||||
# This separation *must* be enforced strictly, because nothing prevents
|
||||
# a GNUmakefile from including both aggregate.make and subproject.make!
|
||||
#
|
||||
# For this reason, when we pass xxx_SUBPROJECTS to a submake invocation,
|
||||
# we call the new variable _SUBPROJECTS rather than SUBPROJECTS
|
||||
#
|
||||
|
||||
ifneq ($($*_SUBPROJECTS),)
|
||||
SUBPROJECT_OBJ_FILES = $(foreach d, $($*_SUBPROJECTS), \
|
||||
ifneq ($(_SUBPROJECTS),)
|
||||
SUBPROJECT_OBJ_FILES = $(foreach d, $(_SUBPROJECTS), \
|
||||
$(addprefix $(d)/, $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)))
|
||||
else
|
||||
ifneq ($(SUBPROJECTS),)
|
||||
SUBPROJECT_OBJ_FILES = $(foreach d, $(SUBPROJECTS), \
|
||||
$(addprefix $(d)/, $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)))
|
||||
endif
|
||||
endif
|
||||
|
||||
#ifneq ($(SUBPROJECTS),)
|
||||
# SUBPROJECT_OBJ_FILES = $(foreach d, $(SUBPROJECTS), \
|
||||
# $(addprefix $(d)/, $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)))
|
||||
#endif
|
||||
|
||||
OBJC_OBJS = $(OBJC_FILES:.m=${OEXT})
|
||||
OBJC_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(OBJC_OBJS))
|
||||
|
||||
|
@ -404,6 +634,37 @@ PSWRAP_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(PSWRAP_OBJS))
|
|||
C_OBJS = $(C_FILES:.c=${OEXT})
|
||||
C_OBJ_FILES = $(PSWRAP_OBJ_FILES) $(addprefix $(GNUSTEP_OBJ_DIR)/,$(C_OBJS))
|
||||
|
||||
# C++ files might end in .C, .cc, .cpp, .cxx, .cp so we replace multiple times
|
||||
CC_OBJS = $(patsubst %.cc,%${OEXT},\
|
||||
$(patsubst %.C,%${OEXT},\
|
||||
$(patsubst %.cp,%${OEXT},\
|
||||
$(patsubst %.cpp,%${OEXT},\
|
||||
$(patsubst %.cxx,%${OEXT},$(CC_FILES))))))
|
||||
CC_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(CC_OBJS))
|
||||
|
||||
# OBJ_FILES_TO_LINK is the set of all .o files which will be linked
|
||||
# into the result - please note that you can add to OBJ_FILES_TO_LINK
|
||||
# by defining manually some special xxx_OBJ_FILES for your
|
||||
# tool/app/whatever
|
||||
OBJ_FILES_TO_LINK = $(C_OBJ_FILES) $(OBJC_OBJ_FILES) $(CC_OBJ_FILES) \
|
||||
$(SUBPROJECT_OBJ_FILES) $(OBJ_FILES)
|
||||
|
||||
ifeq ($(AUTO_DEPENDENCIES),yes)
|
||||
ifneq ($(strip $(OBJ_FILES_TO_LINK)),)
|
||||
-include $(addsuffix .d, $(basename $(OBJ_FILES_TO_LINK)))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# If we are using Windows32 DLLs, for each library that we link
|
||||
# against, pass a -Dlib{library_name}_ISDLL=1 option to the
|
||||
# preprocessor (for example, -Dlibgnustep_base_ISDLL=1 or
|
||||
# -Dlibobjc_ISDLL=1). This preprocessor define might be used by the
|
||||
# library header files to know they are included from external code
|
||||
# needing to use the library symbols, so that the library header files
|
||||
# can in this case use __declspec(dllimport) to mark symbols as
|
||||
# needing to be put into the import table for the
|
||||
# executable/library/whatever that is being compiled.
|
||||
ifeq ($(WITH_DLL),yes)
|
||||
TMP_LIBS := $(LIBRARIES_DEPEND_UPON) $(BUNDLE_LIBS) $(ADDITIONAL_GUI_LIBS) $(ADDITIONAL_OBJC_LIBS) $(ADDITIONAL_LIBRARY_LIBS)
|
||||
TMP_LIBS := $(filter -l%, $(TMP_LIBS))
|
||||
|
@ -421,9 +682,6 @@ TMP_LIBS := $(shell echo $(TMP_LIBS)|tr '-' '_')
|
|||
ALL_CPPFLAGS += $(TMP_LIBS:%=-Dlib%_ISDLL=1)
|
||||
endif
|
||||
|
||||
# Rules processed second time
|
||||
endif
|
||||
|
||||
#
|
||||
# Common variables for frameworks
|
||||
#
|
||||
|
@ -439,13 +697,36 @@ FRAMEWORK_DIR_NAME := $(FRAMEWORK_NAME:=.framework)
|
|||
FRAMEWORK_VERSION_DIR_NAME := $(FRAMEWORK_DIR_NAME)/Versions/$(CURRENT_VERSION_NAME)
|
||||
SUBPROJECT_ROOT_DIR := "."
|
||||
|
||||
ifeq ($(OBJ_DIR_RULE),)
|
||||
OBJ_DIR_RULE = defined
|
||||
# The rule to create the objects file directory. This rule is here so that it
|
||||
# can be accessed from the global before and after targets as well.
|
||||
$(GNUSTEP_OBJ_DIR):
|
||||
@$(MKDIRS) ./$(GNUSTEP_OBJ_DIR)
|
||||
endif
|
||||
@($(MKDIRS) ./$(GNUSTEP_OBJ_DIR); \
|
||||
rm -f obj; \
|
||||
$(LN_S) ./$(GNUSTEP_OBJ_DIR) obj)
|
||||
|
||||
##
|
||||
## THE ONLY DIFFERENCE WITH THE TOP LEVEL rules.make IS THAT THE FOLLOWING
|
||||
## includes HAVE BEEN COMMENTED OUT
|
||||
##
|
||||
|
||||
#
|
||||
# Now rules for packaging - all automatically included
|
||||
#
|
||||
|
||||
#
|
||||
# Rules for building source distributions
|
||||
#
|
||||
#include $(GNUSTEP_MAKEFILES)/source-distribution.make
|
||||
|
||||
#
|
||||
# Rules for building spec files/file lists for RPMs, and RPMs
|
||||
#
|
||||
#include $(GNUSTEP_MAKEFILES)/rpm.make
|
||||
|
||||
#
|
||||
# Rules for building debian/* scripts for DEBs, and DEBs
|
||||
#
|
||||
#include $(GNUSTEP_MAKEFILES)/deb.make <TODO>
|
||||
|
||||
endif
|
||||
# rules.make loaded
|
||||
|
|
Loading…
Reference in a new issue