libs-base/Source/Makefile.postamble

302 lines
9.7 KiB
Text
Raw Normal View History

#
# Makefile.postamble
#
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
#
# This file is part of the GNUstep Base Library.
#
# 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.
#
# If you are interested in a warranty or support for this source code,
# contact Scott Christley at scottc@net-community.com
#
# You should have received a copy of the GNU Library 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.
#
# Makefile.postamble
#
# Project specific makefile rules
#
# Uncomment the targets you want.
# The double colons (::) are important, do not make them single colons
# otherwise the normal makefile rules will not be performed.
#
# Things to do before compiling
before-all:: $(GENERATED_HFILES)
# Things to do after compiling
# after-all::
# Things to do before installing
# before-install::
# Things to do after installing
#
# Unfortunately the way the header files are placed in relationship
# to the source we must install the GNU header manually
after-install::
for file in $(GNU_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/base/$$file \
$(GNUSTEP_HEADERS)/gnustep/base/$$file ; \
done
for file in $(UNICODE_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(GNUSTEP_HEADERS)/gnustep/$$file ; \
done
$(INSTALL_DATA) $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/GSConfig.h \
$(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
$(INSTALL_DATA) $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/mframe.h \
$(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
if [ "$(INSTALL_ROOT_DIR)" = "" ]; then \
services=/etc/services; \
else \
mkdir -p $(INSTALL_ROOT_DIR)/etc; \
services=$(INSTALL_ROOT_DIR)/etc/services.add; \
fi; \
if [ "`$(WHOAMI)`" != root ]; then \
echo "WARNING: Please add the following lines to $$services"; \
echo "gdomap 538/tcp # GNUstep distrib objects"; \
echo "gdomap 538/udp # GNUstep distrib objects"; \
else \
if [ "`fgrep gdomap $$services 2>/dev/null`" = "" ]; then \
echo "GNUstep addons for /etc/services written to $$services"; \
set -x; \
echo "gdomap 538/tcp # GNUstep distrib objects" >> $$services; \
echo "gdomap 538/udp # GNUstep distrib objects" >> $$services; \
fi; \
fi
# Things to do before uninstalling
# before-uninstall::
# Things to do after uninstalling
after-uninstall::
for file in $(GNU_HEADERS); do \
rm $(GNUSTEP_HEADERS)/gnustep/base/$$file ; \
done
for file in $(UNICODE_HEADERS); do \
rm $(GNUSTEP_HEADERS)/gnustep/$$file ; \
done
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
# after-clean::
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
after-distclean::
rm -f Foundation/config.h Foundation/GSConfig.h Foundation/dynamic-load.h \
Foundation/preface.h mframe/mframe.h Foundation base \
NSNumber[0-9]*.m NSValue[0-9]*.m o_*_bas.m
rm -rf $(GNUSTEP_TARGET_CPU)
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::
# Local links to the include files
Foundation:
$(LN_S) $(srcdir)/../Headers/gnustep/base Foundation
# Creation of NSValue and NSNumber concrete classes from templates
$(NSVALUE_MFILES) : NSCTemplateValue.m
rm -f $@
echo '#define TYPE_ORDER' `echo $@ | sed -e "s,[^0-9],,g"` >$@
cat $(srcdir)/NSCTemplateValue.m >> $@
$(NSNUMBER_MFILES) : NSConcreteNumber.m
rm -f $@
echo '#define TYPE_ORDER' `echo $@ | sed -e "s,[^0-9],,g"` >$@
cat $(srcdir)/NSConcreteNumber.m >> $@
$(GNUSTEP_OBJ_DIR)/objc-load${OEXT}: dynamic-load.h
dynamic-load.h: ../config.status
rm -f dynamic-load.h
cp $(srcdir)/$(DYNAMIC_LINKER)-load.h dynamic-load.h
Foundation/preface.h: $(srcdir)/Foundation/preface.h.in ../Version
rm -f $@
sed -e "s/@VERSION@/$(LIBRARY_VAR)_VERSION $(VERSION)/" \
< $(srcdir)/Foundation/preface.h.in | \
sed -e "s/@MAJOR_VERSION@/$(LIBRARY_VAR)_MAJOR_VERSION $(MAJOR_VERSION)/" | \
sed -e "s/@MINOR_VERSION@/$(LIBRARY_VAR)_MINOR_VERSION $(MINOR_VERSION)/" | \
sed -e "s/@SUBMINOR_VERSION@/$(LIBRARY_VAR)_SUBMINOR_VERSION $(SUBMINOR_VERSION)/" | \
sed -e "s/@GCC_VERSION@/$(LIBRARY_VAR)_GCC_VERSION $(GCC_VERSION)/" | \
sed -e "s/@LIBRARY_NAME@/$(LIBRARY_VAR)_LIBRARY_NAME $(LIBRARY_NAME)/" | \
sed -e "s/@PACKAGE_NAME@/$(LIBRARY_VAR)_PACKAGE_NAME $(PACKAGE_NAME)/" \
> $@
$(GNUSTEP_OBJ_DIR)/preface${OEXT}: Foundation/preface.h
#
# The config.h file is specific to a target
#
$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/config.h: ../config.status
$(MKDIRS) $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-mv Foundation/config.h $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-touch $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/config.h
$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/GSConfig.h: ../config.status
$(MKDIRS) $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-mv Foundation/GSConfig.h $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-touch $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/GSConfig.h
$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/mframe.h: mframe/config.status
$(MKDIRS) $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-mv mframe/mframe.h $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
-touch $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/mframe.h
Foundation/o_%_bas.h: Foundation/o_x_bas.h.in
sed -e "s/@XX@/$*/g" $< > $@
Foundation/o_%_cbs.h: Foundation/o_x_cbs.h.in
sed -e "s/@YY@/$*/g" $< > $@
o_%_bas.m: o_x_bas.m.in Foundation/o_%.h
sed -e "s/@XX@/$*/g" $< > $@
o_%_cbs.m: o_x_cbs.m.in Foundation/o_%.h
sed -e "s/@YY@/$*/g" $< > $@
$(GNUSTEP_OBJ_DIR)/o_array.o: o_array.m Foundation/o_array.h
Foundation/o_array.h: Foundation/o_array_bas.h Foundation/o_array_cbs.h Foundation/o_hash.h
$(GNUSTEP_OBJ_DIR)/o_hash.o: o_hash.m Foundation/o_hash.h
Foundation/o_hash.h: Foundation/o_hash_bas.h Foundation/o_hash_cbs.h
$(GNUSTEP_OBJ_DIR)/o_list.o: o_list.m Foundation/o_list.h
Foundation/o_list.h: Foundation/o_list_bas.h Foundation/o_list_cbs.h Foundation/o_array.h Foundation/o_hash.h
$(GNUSTEP_OBJ_DIR)/o_map.o: o_map.m Foundation/o_map.h
Foundation/o_map.h: Foundation/o_map_bas.h Foundation/o_map_cbs.h Foundation/o_hash.h
#
# Files that include mframe.h will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/mframe.o \
$(GNUSTEP_OBJ_DIR)/NSConnection.o \
$(GNUSTEP_OBJ_DIR)/NSInvocation.o \
$(GNUSTEP_OBJ_DIR)/NSMethodSignature.o \
$(GNUSTEP_OBJ_DIR)/NSObjCRuntime.o \
: $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/mframe.h
#
# Files where optimisation breaks the code!
# These have to filter the optimisation flag out.
#
$(GNUSTEP_OBJ_DIR)/mframe.o : mframe.m
$(CC) -c $(filter-out -O%, $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS)) -o $@ $<
$(GNUSTEP_OBJ_DIR)/NSConnection.o : NSConnection.m
$(CC) -c $(filter-out -O%, $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS)) -o $@ $<
$(GNUSTEP_OBJ_DIR)/NSInvocation.o : NSInvocation.m
$(CC) -c $(filter-out -O%, $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS)) -o $@ $<
#
# Files that need a rebuild if GSConfig.h is changed.
#
$(GNUSTEP_OBJ_DIR)/mframe.o \
$(GNUSTEP_OBJ_DIR)/NSArchiver.o \
$(GNUSTEP_OBJ_DIR)/NSConnection.o \
$(GNUSTEP_OBJ_DIR)/NSData.o \
$(GNUSTEP_OBJ_DIR)/NSInvocation.o \
$(GNUSTEP_OBJ_DIR)/NSMethodSignature.o \
$(GNUSTEP_OBJ_DIR)/NSProcessInfo.o \
$(GNUSTEP_OBJ_DIR)/NSUnarchiver.o \
: $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/GSConfig.h
#
# Files that include GSIArray.h will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/NSNotificationCenter.o \
$(GNUSTEP_OBJ_DIR)/NSRunLoop.o \
$(GNUSTEP_OBJ_DIR)/NSSerializer.o \
$(GNUSTEP_OBJ_DIR)/NSUnarchiver.o \
: Foundation/GSIArray.h Foundation/GSUnion.h
#
# Files that include GSIMap.h will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/NSArchiver.o \
$(GNUSTEP_OBJ_DIR)/NSGCountedSet.o \
$(GNUSTEP_OBJ_DIR)/NSGDictionary.o \
$(GNUSTEP_OBJ_DIR)/NSGSet.o \
$(GNUSTEP_OBJ_DIR)/NSNotificationCenter.o \
$(GNUSTEP_OBJ_DIR)/NSSerializer.o \
: Foundation/GSIMap.h Foundation/GSUnion.h
#
# Files that include fast.x will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/NSArchiver.o \
$(GNUSTEP_OBJ_DIR)/NSArray.o \
$(GNUSTEP_OBJ_DIR)/NSData.o \
$(GNUSTEP_OBJ_DIR)/NSGCString.o \
$(GNUSTEP_OBJ_DIR)/NSGDictionary.o \
$(GNUSTEP_OBJ_DIR)/NSGString.o \
$(GNUSTEP_OBJ_DIR)/NSInvocation.o \
$(GNUSTEP_OBJ_DIR)/NSObjCRuntime.o \
$(GNUSTEP_OBJ_DIR)/NSObject.o \
$(GNUSTEP_OBJ_DIR)/NSSerializer.o \
$(GNUSTEP_OBJ_DIR)/NSString.o \
$(GNUSTEP_OBJ_DIR)/NSUnarchiver.o \
: Foundation/fast.x
#
# Files that include propList.h will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/NSString.o \
$(GNUSTEP_OBJ_DIR)/NSGString.o \
$(GNUSTEP_OBJ_DIR)/NSGCString.o \
: propList.h
#
# Files that include GSeq.h will need a rebuild if it is changed.
#
$(GNUSTEP_OBJ_DIR)/NSString.o \
$(GNUSTEP_OBJ_DIR)/NSGString.o \
$(GNUSTEP_OBJ_DIR)/NSGCString.o \
: GSeq.h
#
# NSGeometry.m needs a recompile if NSGeometry.h is changed.
#
$(GNUSTEP_OBJ_DIR)/NSGeometry.o \
: Foundation/NSGeometry.h
TAGS: $(DIST_FILES)
etags $(DIST_FILES)
AUTHORS: GNUmakefile
rm -f AUTHORS
@echo Finding file authors...
@echo 'For the legal record, here is a list of who wrote what:'>AUTHORS
@for a in $(FILE_AUTHORS) \
; do \
echo >>AUTHORS; \
echo >>AUTHORS; \
echo "$${a}:" >>AUTHORS; \
egrep -l "((Written by)|(Author)|(Rewritten by)).*$${a}" \
$(DIST_FILES) >>AUTHORS; \
done
regenerate: $(DIST_FILES)
mv AUTHORS ..
FORCE: