Rewritten built system for gnustep-make's Documentation so that it's using

a standard GNUmakefile without duplication of code with gnustep-make,
automatically installing a local/temporary gnustpe-make if needed; removed
usage of autoconf for Documentation building.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@18854 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2004-03-18 13:17:22 +00:00
parent 50c03f2551
commit 2b6f94dd3f
6 changed files with 85 additions and 1219 deletions

View file

@ -1,3 +1,14 @@
Thu Mar 18 12:57:40 2004 Nicola Pero <n.pero@mi.flashnet.it>
* Documentation/GNUmakefile: New file using standard gnustep-make
to build the documentation. If there is no available gnustep-make
installation, it creates a local/temporary one, and uses it.
* Documentation/GNUmakefile.in: Removed.
* Documentation/makerules.make: Removed.
* Documentation/makedoc.make: Removed.
* configure.ac: Do not generate Documentation/GNUmakefile.
* configure: Regenerated.
2004-03-17 Adam Fedor <fedor@gnu.org>
* Instance/palette.make: Link palatte to all libs on Windows

View file

@ -1,47 +1,65 @@
#
# Documentation makefile for the GNUstep Makefile Package
# Copyright (C) 2000 Free Software Foundation, Inc.
# This GNUmakefile needs to build the gnustep-make documentation.
#
# Written: Adam Fedor <fedor@gnu.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
# Install into the system root by default
prefix = @prefix@
GNUSTEP_INSTALLATION_DIR = $(prefix)
GNUSTEP_DOCUMENTATION = $(GNUSTEP_INSTALLATION_DIR)/Library/Documentation
GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOCUMENTATION)/info
GNUSTEP_DOCUMENTATION_MAN = $(GNUSTEP_DOCUMENTATION)/man
MAKEFILE_NAME = GNUmakefile
# The GNUmakefile itself is written using gnustep-make. If we find an
# existing gnustep-make installation, we use it. Otherwise, we
# configure, compile and install gnustep-make into a temporary
# subdirectory, then we use that copy.
include ../Version
# In the very unlikely event that gnustep-make does not even install
# on your machine, please get a pre-generated copy of the
# documentation from the internet! Or just read the documentation in
# source format. :-)
GNUSTEP_MAKEINFO = makeinfo
GNUSTEP_MAKEINFO_FLAGS = -D NO-TEXI2HTML
GNUSTEP_MAKETEXT = makeinfo
GNUSTEP_MAKETEXT_FLAGS = -D NO-TEXI2HTML -D TEXT-ONLY --no-header --no-split
GNUSTEP_TEXI2DVI = texi2dvi
GNUSTEP_TEXI2DVI_FLAGS =
GNUSTEP_TEXI2HTML = texi2html
GNUSTEP_TEXI2HTML_FLAGS = -split_chapter -expandinfo -init_file gnustep.init
GNUSTEP_DVIPS = dvips
GNUSTEP_DVIPS_FLAGS =
TAR = @TAR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKDIRS = ../mkinstalldirs
ifeq ($(GNUSTEP_MAKEFILES),)
# We have no gnustep-make installation to use. We need gnustep-make
# to generate the documentation.
# To help lazy cows who want to type 'make' and have all work
# automatically without installating gnustep-make first, if we don't
# have a gnustep-make installation to use, we create a temporary one
# in the subdirectory ./tmp-installation, execute GNUstep.sh in that
# directory, then run make again.
# To execute all, or clean, or install, we first depend on a local
# temporary installation of gnustep-make; when we have it, we source
# GNUstep.sh, then we run the make command again. Please note that
# "make install" will install into our temporary gnustep-make
# directory, which is usually not particularly useful, but anyway.
all clean install: ./tmp-installation/System/Library/Makefiles/GNUstep.sh
@echo "** Running 'make $@' using the local/temporary gnustep-make installation **"
(. ./tmp-installation/System/Library/Makefiles/GNUstep.sh; \
$(MAKE) $@)
CURRENT_DIR = $(shell pwd)
# This creates a local temporary installation of GNUstep-make
./tmp-installation/System/Library/Makefiles/GNUstep.sh:
@echo "** No gnustep-make installation found, attempting to create a local/temporary one. **"
(mkdir tmp-build; \
cd tmp-build; \
../../configure --prefix="$(CURRENT_DIR)/tmp-installation"; \
make; \
make install)
distclean:
-(if [ -f ./tmp-installation/System/Library/Makefiles/GNUstep.sh ]; then \
. ./tmp-installation/System/Library/Makefiles/GNUstep.sh; \
$(MAKE) $@; \
fi)
rm -Rf tmp-installation tmp-build
else
# We have a gnustep-make installation to use. The following is a
# normal gnustep-make GNUmakefile for documentation.
# We normally install into System
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_MAKEFILES)/common.make
# The documents to be generated
DOCUMENT_NAME = gnustep-howto faq filesystem internals machines make userfaq
@ -110,17 +128,20 @@ ANNOUNCE_DOC_INSTALL_DIR = Developer/Make/ReleaseNotes/$(GNUSTEP_MAKE_VERSION)
MAN1_PAGES = openapp.1
MAN7_PAGES = GNUstep.7
include makerules.make
include makedoc.make
include $(GNUSTEP_MAKEFILES)/documentation.make
# Typing 'make regenerate' should build all, then install the files
# top-level. This is mostly for making gnustep-make releases.
regenerate: all
mv -f $(TOP_DOC_FILES) ..
# Generate the version.texi file from the Version of gnustep-make.
version.texi: ../Version
rm -f version.texi
echo '@set GNUSTEP-MAKE-VERSION' $(GNUSTEP_MAKE_VERSION) \
> version.texi
# Install manually man pages
after-install:: $(GNUSTEP_DOCUMENTATION)/Developer/Make/Manual
$(INSTALL_DATA) DESIGN $(GNUSTEP_DOCUMENTATION)/Developer/Make/Manual
if [ ! -f $(GNUSTEP_DOCUMENTATION_MAN) ]; then \
@ -147,10 +168,20 @@ after-install:: $(GNUSTEP_DOCUMENTATION)/Developer/Make/Manual
fi; \
done;
# Uninstall manually man pages
after-uninstall::
rm -f $(GNUSTEP_DOCUMENTATION)/Developer/Make/Manual/DESIGN
for file in $(MAN1_PAGES) __done; do \
if [ $$file != __done ]; then \
rm -f $(GNUSTEP_DOCUMENTATION_MAN)/man1/$$file; \
fi; \
done;
for file in $(MAN7_PAGES) __done; do \
if [ $$file != __done ]; then \
rm -f $(GNUSTEP_DOCUMENTATION_MAN)/man7/$$file; \
fi; \
done;
after-distclean::
rm -f version.texi
endif

View file

@ -1,439 +0,0 @@
# -*-makefile-*-
# documentation.make - modified into makedoc.make - see comments
# at the beginning of file for what was changed
#
# 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: 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.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# prevent multiple inclusions
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.
#
# The names of text documents are in the DOCUMENT_TEXT_NAME variable.
#
# The main file for text document is in the xxx_TEXT_MAIN variable.
# The Texinfo files that needs pre-processing are in xxx_TEXI_FILES
# The GSDoc files that needs pre-processing are in xxx_GSDOC_FILES
# The LaTeX files that needs pre-processing are in xxx_LATEX_FILES
#
# Javadoc support:
# The Java classes and packages that needs documenting using javadoc
# are in xxx_JAVADOC_FILES (could contain both packages, as
# `gnu.gnustep.base', and standalone classes, as
# `gnu.gnustep.base.NSArray.java')
#
# The sourcepath to the Java classes source code in in xxx_JAVADOC_SOURCEPATH
# (it can contain more than one path, as CLASSPATH or LD_LIBRARY_PATH do).
# To set special flags for javadoc (eg, -public), use ADDITIONAL_JAVADOCFLAGS
#
# The installation directory is in the xxx_DOC_INSTALL_DIR variable
# (eg, Gui_DOC_INSTALL_DIR = Developer/Gui/Reference
# Things should be installed under `Developer/YourProjectName' or
# `User/YourProjectName' - for Javadoc, use `Developer/YourProjectName' or
# `Developer/YourProjectName/Java' if your project has both java and
# non java)
#
# Where xxx is the name of the document
#
DOCUMENT_NAME:=$(strip $(DOCUMENT_NAME))
DOCUMENT_TEXT_NAME:=$(strip $(DOCUMENT_TEXT_NAME))
ifeq ($(INTERNAL_doc_NAME)$(INTERNAL_textdoc_NAME),)
# This part is included the first time make is invoked.
internal-all:: $(DOCUMENT_NAME:=.all.doc.variables) \
$(DOCUMENT_TEXT_NAME:=.all.textdoc.variables)
internal-install:: $(DOCUMENT_NAME:=.install.doc.variables) \
$(DOCUMENT_TEXT_NAME:=.install.textdoc.variables)
internal-uninstall:: $(DOCUMENT_NAME:=.uninstall.doc.variables) \
$(DOCUMENT_TEXT_NAME:=.uninstall.textdoc.variables)
internal-clean:: $(DOCUMENT_NAME:=.clean.doc.variables) \
$(DOCUMENT_TEXT_NAME:=.clean.textdoc.variables)
internal-distclean:: $(DOCUMENT_NAME:=.distclean.doc.variables) \
$(DOCUMENT_TEXT_NAME:=.distclean.textdoc.variables)
#$(DOCUMENT_NAME):
# @$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory \
# $@.all.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
#
#
# Compilation targets
#
#
# Compilation of texinfo files
#
ifneq ($(TEXI_FILES),)
internal-doc-all:: before-$(TARGET)-all \
$(INTERNAL_doc_NAME).info \
$(INTERNAL_doc_NAME).ps \
$(INTERNAL_doc_NAME)_toc.html \
after-$(TARGET)-all
internal-textdoc-all:: before-$(TARGET)-all \
$(INTERNAL_textdoc_NAME) \
after-$(TARGET)-all
$(INTERNAL_doc_NAME).info: $(TEXI_FILES)
$(GNUSTEP_MAKEINFO) $(GNUSTEP_MAKEINFO_FLAGS) \
-o $@ $(INTERNAL_doc_NAME).texi
$(INTERNAL_doc_NAME).dvi: $(TEXI_FILES)
$(GNUSTEP_TEXI2DVI) $(GNUSTEP_TEXI2DVI_FLAGS) $(INTERNAL_doc_NAME).texi
$(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) \
$(INTERNAL_doc_NAME).texi
$(INTERNAL_textdoc_NAME): $(TEXI_FILES) $(TEXT_MAIN)
$(GNUSTEP_MAKETEXT) $(GNUSTEP_MAKETEXT_FLAGS) \
-o $@ $(TEXT_MAIN)
endif # TEXI_FILES
before-$(TARGET)-all::
after-$(TARGET)-all::
#
# Compilation of gsdoc files
#
ifneq ($(GSDOC_FILES),)
# 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-all:: before-$(TARGET)-all \
$(GSDOC_OBJECT_FILES) \
after-$(TARGET)-all
$(GSDOC_OBJECT_FILES): $(GSDOC_FILES)
gsdoc $(GSDOC_FILES)
endif # GSDOC_FILES
#
# Compilation of LaTeX files
#
ifneq ($(LATEX_FILES),)
#
# Targets which are always built
#
$(INTERNAL_doc_NAME).dvi: $(LATEX_FILES)
latex $(INTERNAL_doc_NAME).tex
latex $(INTERNAL_doc_NAME).tex
$(INTERNAL_doc_NAME).ps: $(INTERNAL_doc_NAME).dvi
$(GNUSTEP_DVIPS) $(GNUSTEP_DVIPS_FLAGS) \
$(INTERNAL_doc_NAME).dvi -o $@
$(INTERNAL_doc_NAME).ps.gz: $(INTERNAL_doc_NAME).ps
gzip $(INTERNAL_doc_NAME).ps -c > $(INTERNAL_doc_NAME).ps.gz
internal-doc-all:: before-$(TARGET)-all \
$(INTERNAL_doc_NAME).ps.gz
#
# Targets built only if we can find `latex2html'
#
# NB: you may set LATEX2HTML on the command line if the following doesn't work
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) cfz $(INTERNAL_doc_NAME).tar.gz $(INTERNAL_doc_NAME)
endif # LATEX2HTML
internal-doc-all:: after-$(TARGET)-all
endif # LATEX_FILES
#
# Documentation generated with javadoc
#
ifneq ($(JAVADOC_FILES),)
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)
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
#
#
# Installation directory - always created
#
internal-doc-install:: $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR):
$(MKDIRS) $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(GNUSTEP_DOCUMENTATION_INFO):
$(MKDIRS) $(GNUSTEP_DOCUMENTATION_INFO)
#
# texi installation
#
ifneq ($(TEXI_FILES),)
# NB: Only install HTML if it has been generated
internal-doc-install:: $(GNUSTEP_DOCUMENTATION_INFO)
$(INSTALL_DATA) $(INTERNAL_doc_NAME).ps \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(INSTALL_DATA) $(INTERNAL_doc_NAME).info $(GNUSTEP_DOCUMENTATION_INFO)
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 \
$(GNUSTEP_DOCUMENTATION_INFO)/$(INTERNAL_doc_NAME).info
rm -f \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)_*.html
endif # TEXI_FILES
#
# gsdoc installation
#
ifneq ($(GSDOC_FILES),)
internal-doc-install::
$(INSTALL_DATA) $(GSDOC_OBJECT_FILES) \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
internal-doc-uninstall::
rm -f \
$(addprefix $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/,\
$(GSDOC_OBJECT_FILES))
endif # GSDOC_FILES
#
# LaTeX installation
#
ifneq ($(LATEX_FILES),)
internal-doc-install::
$(INSTALL_DATA) $(INTERNAL_doc_NAME).ps \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
internal-doc-uninstall::
rm -f \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME).ps
ifeq ($(HAS_LATEX2HTML),yes)
internal-doc-install::
$(INSTALL_DATA) $(INTERNAL_doc_NAME)/*.html \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(INSTALL_DATA) $(INTERNAL_doc_NAME)/*.css \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
# Yeah - I know - the following is dangerous if you have misused the
# DOC_INSTALL_DIR - but it's the only way to do it
internal-doc-uninstall::
-rm -f $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/*.html
-rm -f $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/*.css
endif # LATEX2HTML
endif # LATEX_FILES
#
# Javadoc installation
#
ifneq ($(JAVADOC_FILES),)
internal-doc-install::
rm -rf $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
$(TAR) cf - $(INTERNAL_doc_NAME) | \
(cd $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
endif
internal-doc-uninstall::
-rm -f $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
endif # JAVADOC_FILES
#
# text file installation
#
internal-textdoc-install:: $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(INSTALL_DATA) $(INTERNAL_textdoc_NAME) \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
internal-textdoc-uninstall::
rm -f \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_textdoc_NAME)
#
# Cleaning targets
#
internal-doc-clean::
@ -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),)
@ -rm -f $(GSDOC_OBJECT_FILES)
endif
ifneq ($(LATEX_FILES),)
@ rm -f *.aux
endif
ifneq ($(JAVADOC_FILES),)
@ -rm -Rf $(INTERNAL_doc_NAME)
endif
internal-textdoc-clean::
@ 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
internal-textdoc-distclean::
endif
endif
# documentation.make loaded

View file

@ -1,736 +0,0 @@
#
# 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, 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.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 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
#
# 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
#
#
# 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
# 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
clean:: before-clean internal-clean after-clean
ifeq ($(MAKELEVEL),0)
distclean:: clean before-distclean internal-distclean after-distclean
else
distclean:: before-distclean internal-distclean after-distclean
endif
check:: before-check internal-check after-check
#
# Placeholders for internal targets
#
before-all::
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::
after-uninstall::
before-clean::
internal-clean::
rm -rf *~ obj
after-clean::
before-distclean::
internal-distclean::
after-distclean::
before-check::
internal-check::
after-check::
# declare targets as PHONY
.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
# 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
$(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) \
$(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_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) \
$(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_FLAGS) $(GNUSTEP_USER_HEADERS_FLAGS) \
$(GNUSTEP_LOCAL_HEADERS_FLAGS) $(GNUSTEP_NETWORK_HEADERS_FLAGS) \
$(GNUSTEP_SYSTEM_HEADERS_FLAGS)
# if you need, you can define ADDITIONAL_CCFLAGS to add C++ specific flags
ALL_CCFLAGS = $(ADDITIONAL_CCFLAGS) $(AUXILIARY_CCFLAGS)
INTERNAL_CLASSPATHFLAGS = -classpath ./$(subst ::,:,:$(strip $(ADDITIONAL_CLASSPATH)):)$(CLASSPATH)
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.
#
ifeq ($(strip $(BUNDLE_EXTENSION)),)
BUNDLE_EXTENSION = .bundle
endif
# General rules
VPATH = .
.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 \
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
$(ALL_CFLAGS)) \
$($<_FILE_FLAGS) -o $@
$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
$(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) \
$(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) \
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_JAVAHFLAGS)) \
$($<_FILE_FLAGS) -o $@ $(subst /,.,$*)
%.c : %.psw
pswrap -h $*.h -o $@ $<
# 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
# are in the OBJC_FILES variable.
#
# 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.
#
# The list of JAVA source files to be compiled
# are in the JAVA_FILES variable.
#
# The list of JAVA source files from which to generate jni headers
# 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), \
$(addprefix $(d)/, $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)))
endif
OBJC_OBJS = $(OBJC_FILES:.m=${OEXT})
OBJC_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(OBJC_OBJS))
JAVA_OBJS = $(JAVA_FILES:.java=.class)
JAVA_OBJ_FILES = $(JAVA_OBJS)
JAVA_JNI_OBJS = $(JAVA_JNI_FILES:.java=.h)
JAVA_JNI_OBJ_FILES = $(JAVA_JNI_OBJS)
PSWRAP_C_FILES = $(PSWRAP_FILES:.psw=.c)
PSWRAP_H_FILES = $(PSWRAP_FILES:.psw=.h)
PSWRAP_OBJS = $(PSWRAP_FILES:.psw=${OEXT})
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))
# filter all non-static libs (static libs are those ending in _ds, _s, _ps..)
TMP_LIBS := $(filter-out -l%_ds, $(TMP_LIBS))
TMP_LIBS := $(filter-out -l%_s, $(TMP_LIBS))
TMP_LIBS := $(filter-out -l%_dps,$(TMP_LIBS))
TMP_LIBS := $(filter-out -l%_ps, $(TMP_LIBS))
# strip away -l, _p and _d ..
TMP_LIBS := $(TMP_LIBS:-l%=%)
TMP_LIBS := $(TMP_LIBS:%_d=%)
TMP_LIBS := $(TMP_LIBS:%_p=%)
TMP_LIBS := $(TMP_LIBS:%_dp=%)
TMP_LIBS := $(shell echo $(TMP_LIBS)|tr '-' '_')
ALL_CPPFLAGS += $(TMP_LIBS:%=-Dlib%_ISDLL=1)
endif
#
# Common variables for frameworks
#
ifeq ($(CURRENT_VERSION_NAME),)
CURRENT_VERSION_NAME := A
endif
ifeq ($(DEPLOY_WITH_CURRENT_VERSION),)
DEPLOY_WITH_CURRENT_VERSION := yes
endif
FRAMEWORK_NAME := $(strip $(FRAMEWORK_NAME))
FRAMEWORK_DIR_NAME := $(FRAMEWORK_NAME:=.framework)
FRAMEWORK_VERSION_DIR_NAME := $(FRAMEWORK_DIR_NAME)/Versions/$(CURRENT_VERSION_NAME)
SUBPROJECT_ROOT_DIR := "."
# 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); \
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
## Local variables:
## mode: makefile
## End:

3
configure vendored
View file

@ -4663,7 +4663,7 @@ clean_target_vendor=`$srcdir/clean_cpu.sh $target_vendor`
#--------------------------------------------------------------------
# Produce the output files
#--------------------------------------------------------------------
ac_config_files="$ac_config_files config.make openapp debugapp opentool executable.template GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh gnustep-make.spec Documentation/GNUmakefile"
ac_config_files="$ac_config_files config.make openapp debugapp opentool executable.template GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh gnustep-make.spec"
ac_config_commands="$ac_config_commands default"
@ -5211,7 +5211,6 @@ do
"GNUstep.csh" ) CONFIG_FILES="$CONFIG_FILES GNUstep.csh" ;;
"fixpath.sh" ) CONFIG_FILES="$CONFIG_FILES fixpath.sh" ;;
"gnustep-make.spec" ) CONFIG_FILES="$CONFIG_FILES gnustep-make.spec" ;;
"Documentation/GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES Documentation/GNUmakefile" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5

View file

@ -590,7 +590,7 @@ AC_SUBST(target)
#--------------------------------------------------------------------
AC_CONFIG_FILES([config.make openapp debugapp opentool
executable.template GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh
gnustep-make.spec Documentation/GNUmakefile])
gnustep-make.spec])
AC_CONFIG_COMMANDS([default],
[[chmod a+x openapp debugapp opentool fixpath.sh executable.template]],
[[]])