Make the system root be the default installation root.

Use test.make for test programs so that they do not get installed.
Fix NSBundle so that it removes the library combo, target os, and
target cpu when determining the bundle's dir path.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2592 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
netc 1997-10-30 22:23:50 +00:00
parent a707242d50
commit d168026dab
13 changed files with 120 additions and 15 deletions

View file

@ -20,6 +20,9 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version

View file

@ -1,3 +1,26 @@
Thu Oct 30 13:38:51 1997 Scott Christley <scottc@stetson.net-community.com>
* Makefile (GNUSTEP_INSTALLATION_DIR): Make default be system.
* NSCharacterSets/Makefile: Likewise.
* NSTimeZones/Makefile: Likewise.
* Tools/Makefile: Likewise. Use objc.make instead of tool.make
as the file does not require the foundation library.
* admin/Makefile: Likewise.
* checks/Makefile: Likewise. Use test.make so that
the programs do not get installed.
* doc/Makefile: Likewise.
* examples/Makefile: Likewise. Use test.make so that the
programs do not get installed.
* src/Makefile: Likewise. Alter names to correspond with
the new recursive library.make.
* src/Makefile.postamble: Uninstall header files.
* src/NSBundle.m (+mainBundle): Strip off library combo, target
os and target cpu is they are part of the directory list to
the executable so that the bundle path is the top level dir.
* src/externs.m (NSNonRetainedObjectHashCallbacks): Correct name.
Thu Oct 30 14:32:28 1997 Adam Fedor <fedor@spanky.doc.com>
* Makefile (GNUSTEP_INSTALLATION_DIR): New variable.

View file

@ -20,6 +20,9 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version

View file

@ -22,13 +22,16 @@
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version
include ../config.mak
# The tools to be compiled
TOOL_NAME = \
TEST_TOOL_NAME = \
dictionary \
stdio-stream \
textcoding \
@ -60,6 +63,6 @@ custom-zone.m
-include Makefile.preamble
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/tool.make
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/test.make
-include Makefile.postamble

View file

@ -21,6 +21,8 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make

View file

@ -20,6 +20,9 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version

View file

@ -20,6 +20,9 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version

View file

@ -22,6 +22,9 @@
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version
@ -39,6 +42,8 @@ LIBRARY_NAME=libgnustep-base
DEFS= -DGNUSTEP_INSTALL_PREFIX=$(GNUSTEP_SYSTEM_ROOT) \
-DPLATFORM_OS=\"$(GNUSTEP_TARGET_OS)\" \
-DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \
-DGNUSTEP_TARGET_CPU=\"$(GNUSTEP_TARGET_CPU)\" \
-DGNUSTEP_TARGET_OS=\"$(GNUSTEP_TARGET_OS)\" \
-DLIBRARY_COMBO=\"$(LIBRARY_COMBO)\"
# Grep for these names to build the legally-required "AUTHORS" file.
@ -471,12 +476,12 @@ dynamic-load.h \
include/preface.h
# The C source files to be compiled
libgnustep-base_C_FILES = $(GNU_CFILES) $(NEXTSTEP_CFILES) $(NEXTSTEP_DERIVED_CFILES) \
$(BASE_CFILES)
libgnustep-base_C_FILES = $(GNU_CFILES) $(NEXTSTEP_CFILES) \
$(NEXTSTEP_DERIVED_CFILES) $(BASE_CFILES)
# The Objective-C source files to be compiled
libgnustep-base_OBJC_FILES = $(GNU_MFILES) $(NEXTSTEP_MFILES) $(BASE_MFILES) \
$(NSVALUE_MFILES) $(NSNUMBER_MFILES)
libgnustep-base_OBJC_FILES = $(GNU_MFILES) $(NEXTSTEP_MFILES) \
$(BASE_MFILES) $(NSVALUE_MFILES) $(NSNUMBER_MFILES)
libgnustep-base_HEADER_FILES_DIR = .
libgnustep-base_HEADER_FILES_INSTALL_DIR = /gnustep/base

View file

@ -59,6 +59,9 @@ after-install::
# Things to do after uninstalling
after-uninstall::
for file in $(GNU_HEADERS); do \
rm $(GNUSTEP_HEADERS)/gnustep/base/$$file ; \
done
# Things to do before cleaning
# before-clean::

View file

@ -116,6 +116,18 @@ static NSString* gnustep_target_dir =
#else
nil;
#endif
static NSString* gnustep_target_cpu =
#ifdef GNUSTEP_TARGET_CPU
@GNUSTEP_TARGET_CPU;
#else
nil;
#endif
static NSString* gnustep_target_os =
#ifdef GNUSTEP_TARGET_OS
@GNUSTEP_TARGET_OS;
#else
nil;
#endif
static NSString* library_combo =
#ifdef LIBRARY_COMBO
@LIBRARY_COMBO;
@ -232,7 +244,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
if ( !_mainBundle )
{
char *output;
NSString *path;
NSString *path, *s;
path = [[NSProcessInfo processInfo] processName];
output = objc_find_executable([path cString]);
@ -243,6 +255,24 @@ _bundle_load_callback(Class theClass, Category *theCategory)
/* Strip off the name of the program */
path = [path stringByDeletingLastPathComponent];
/* The executable may not lie in the main bundle directory
so we need to chop off the extra subdirectories, the library
combo and the target cpu/os if they exist. The executable and
this library should match so that is why we can use the
compiled-in settings. */
/* library combo */
s = [path lastPathComponent];
if ([s isEqual: library_combo])
path = [path stringByDeletingLastPathComponent];
/* target os */
s = [path lastPathComponent];
if ([s isEqual: gnustep_target_os])
path = [path stringByDeletingLastPathComponent];
/* target cpu */
s = [path lastPathComponent];
if ([s isEqual: gnustep_target_cpu])
path = [path stringByDeletingLastPathComponent];
#ifdef DEBUG
fprintf(stderr, "Debug (NSBundle): Found main in %s\n",
[path cString]);

View file

@ -253,7 +253,7 @@ const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks =
(NSHT_describe_func_t) _NS_owned_void_p_describe
};
const NSHashTableCallBacks NSNonRetainedObjectsHashCallBacks =
const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks =
{
(NSHT_hash_func_t) _NS_non_retained_id_hash,
(NSHT_isEqual_func_t) _NS_non_retained_id_is_equal,

View file

@ -22,13 +22,16 @@
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version
include ../config.mak
# The tools to be compiled
TOOL_NAME = \
TEST_TOOL_NAME = \
test01 \
test02 \
heap \
@ -123,7 +126,7 @@ create-abbrevs_OBJC_FILES = create-abbrevs.m
create-regions_OBJC_FILES = create-regions.m
# The bundles to be compiled
BUNDLE_NAME=LoadMe
TEST_BUNDLE_NAME=LoadMe
# The bundle Objective-C source files to be compiled
LoadMe_OBJC_FILES = LoadMe.m MyCategory.m SecondClass.m
@ -132,7 +135,7 @@ LoadMe_OBJC_FILES = LoadMe.m MyCategory.m SecondClass.m
LoadMe_RESOURCES = English.lproj/NXStringTable.example
LoadMe_RESOURCE_DIRS = English.lproj
SRCS = $(TOOL_NAME:=.m)
SRCS = $(TEST_TOOL_NAME:=.m)
HDRS = \
server.h \
@ -153,7 +156,6 @@ DIST_FILES = $(SRCS) $(HDRS) $(DYNAMIC_MFILES) $(DYNAMIC_HFILES) \
-include Makefile.preamble
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/tool.make
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/bundle.make
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/test.make
-include Makefile.postamble

View file

@ -1,13 +1,38 @@
#
# Tools makefile for GNUstep Base Library
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Written by: Richard Frith-Macdonald <richard@brainstorm.co.uk>
#
# 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.
#
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
# The application to be compiled
TOOL_NAME = gdomap
OBJC_PROGRAM_NAME = gdomap
# The source files to be compiled
gdomap_C_FILES = gdomap.c
-include Makefile.preamble
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/tool.make
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/objc.make
-include Makefile.postamble