Some cleanup for make-2.0 changes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24735 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-03-01 13:43:23 +00:00
parent cb273245bf
commit ae96fefe64
8 changed files with 56 additions and 112 deletions

View file

@ -1,3 +1,15 @@
2007-02-29 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m:
* Source/NSPathUtilities.m:
* Headers/Foundation/NSBundle.h:
* Headers/Additions/GNUstepBase/config.h.in:
* gnustep-base.script.spec.in:
Remove internal GNUSTEP_..._ROOT variables which are no longer used.
* configure.ac:
Refrain from defining GNUSTEP_..._ROOT default values in config.h
* configure: regenerated.
2007-02-28 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Revert part of change which guaranteed use of bad

View file

@ -42,9 +42,6 @@
/* Built in default value for GNUstep local library */
#undef GNUSTEP_TARGET_LOCAL_LIBRARY
/* Built in default value for GNUstep local root */
#undef GNUSTEP_TARGET_LOCAL_ROOT
/* Built in default value for GNUstep local tools */
#undef GNUSTEP_TARGET_LOCAL_TOOLS
@ -78,9 +75,6 @@
/* Built in default value for GNUstep network library */
#undef GNUSTEP_TARGET_NETWORK_LIBRARY
/* Built in default value for GNUstep network root */
#undef GNUSTEP_TARGET_NETWORK_ROOT
/* Built in default value for GNUstep network tools */
#undef GNUSTEP_TARGET_NETWORK_TOOLS
@ -111,9 +105,6 @@
/* Built in default value for GNUstep system library */
#undef GNUSTEP_TARGET_SYSTEM_LIBRARY
/* Built in default value for GNUstep system root */
#undef GNUSTEP_TARGET_SYSTEM_ROOT
/* Built in default value for GNUstep system tools */
#undef GNUSTEP_TARGET_SYSTEM_TOOLS
@ -546,25 +537,25 @@
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* The size of a `double', as computed by sizeof. */
/* The size of `double', as computed by sizeof. */
#undef SIZEOF_DOUBLE
/* The size of a `float', as computed by sizeof. */
/* The size of `float', as computed by sizeof. */
#undef SIZEOF_FLOAT
/* The size of a `int', as computed by sizeof. */
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `long long', as computed by sizeof. */
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* The size of a `short', as computed by sizeof. */
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of a `void*', as computed by sizeof. */
/* The size of `void*', as computed by sizeof. */
#undef SIZEOF_VOIDP
/* Define to 1 if you have the ANSI C header files. */
@ -592,5 +583,5 @@
#undef inline
#endif
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

View file

@ -386,11 +386,28 @@ GS_EXPORT NSString* const NSLoadedClasses;
*/
@interface NSBundle (GNUstep)
/** This method is an experimental GNUstep extension, and
* might change. At the moment, search on the standard GNUstep
* directories (starting from GNUSTEP_USER_ROOT, and going on to
* GNUSTEP_SYSTEM_ROOT) for a directory
* Libraries/Resources/'libraryName'/.
/** This method is an experimental GNUstep extension, and might change.
* <p>Return a bundle which accesses the first existing directory from
* the standard libraries directories whose Resources subdirectory
* contains libraryName.
* Where libraryName is the name of a library without the <em>lib</em>
* prefix or any extensions.
* </p>
* <p>This method exists to provide resource bundles for libraries and has no
* particular relationship to the library code itsself. The named library
* could be a dynamic library linked in to the running program, a static
* library (whose code may not even exist on the host machine except where
* it is linked in to the program), or even a library which is not linked
* into the program at all (eg. where you want to share resources provided
* for a library you do not actually use).
* </p>
* <p>The bundle for the library <em>gnustep-base</em> is a special case ...
* for this bundle the -principalClass method returns [NSObject] and the
* -executablePath method returns the path to the gnustep-base dynamic
* library (if it can be found). As a general rule, library bundles are
* not guaranteed to return values for these methods as the library may
* not exist on disk.
* </p>
*/
+ (NSBundle *) bundleForLibrary: (NSString *)libraryName;

View file

@ -2175,31 +2175,6 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
@implementation NSBundle (GNUstep)
/**
* <p>Return a bundle which accesses the first existing directory from the list
* GNUSTEP_USER_ROOT/Libraries/Resources/libraryName/
* GNUSTEP_NETWORK_ROOT/Libraries/Resources/libraryName/
* GNUSTEP_LOCAL_ROOT/Libraries/Resources/libraryName/
* GNUSTEP_SYSTEM_ROOT/Libraries/Resources/libraryName/<br />
* Where libraryName is the name of a library without the <em>lib</em>
* prefix or any extensions.
* </p>
* <p>This method exists to provide resource bundles for libraries and has no
* particular relationship to the library code itsself. The named library
* could be a dynamic library linked in to the running program, a static
* library (whose code may not even exist on the host machine except where
* it is linked in to the program), or even a library which is not linked
* into the program at all (eg. where you want to share resources provided
* for a library you do not actually use).
* </p>
* <p>The bundle for the library <em>gnustep-base</em> is a special case ...
* for this bundle the -principalClass method returns [NSObject] and the
* -executablePath method returns the path to the gnustep-base dynamic
* library (if it can be found). As a general rule, library bundles are
* not guaranteed to return values for these methods as the library may
* not exist on disk.
* </p>
*/
+ (NSBundle *) bundleForLibrary: (NSString *)libraryName
{
NSArray *paths;

View file

@ -138,15 +138,6 @@ static NSString *gnustep_is_flattened =
static NSString *gnustepConfigPath = nil;
/* This will be deprecated and removed. */
static NSString *gnustepUserRoot = nil; /* GNUSTEP_USER_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepLocalRoot = nil; /* GNUSTEP_LOCAL_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepNetworkRoot = nil; /* GNUSTEP_NETWORK_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepSystemRoot = nil; /* GNUSTEP_SYSTEM_ROOT path */
static NSString *gnustepUserDir = nil;
static NSString *gnustepUserHome = nil;
static NSString *gnustepUserDefaultsDir = nil;
@ -323,10 +314,6 @@ static void ExtractValuesFromConfig(NSDictionary *config)
/*
* Move values out of the dictionary and into variables for rapid reference.
*/
ASSIGN_PATH(gnustepSystemRoot, c, @"GNUSTEP_SYSTEM_ROOT");
ASSIGN_PATH(gnustepNetworkRoot, c, @"GNUSTEP_NETWORK_ROOT");
ASSIGN_PATH(gnustepLocalRoot, c, @"GNUSTEP_LOCAL_ROOT");
ASSIGN_IF_SET(gnustepUserDir, c, @"GNUSTEP_USER_DIR");
ASSIGN_IF_SET(gnustepUserDefaultsDir, c, @"GNUSTEP_USER_DEFAULTS_DIR");
@ -461,9 +448,6 @@ static void ExtractValuesFromConfig(NSDictionary *config)
* Set the GNUSTEP_USER_xxx variables from the user home and the
* GNUSTEP_USER_DIR_xxx variables.
*/
ASSIGN(gnustepUserRoot,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDir]);
ASSIGN(gnustepUserApps,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirApps]);
@ -524,10 +508,6 @@ static void ExtractValuesFromConfig(NSDictionary *config)
/*
* Finally set default locations for the essential paths if required.
*/
ASSIGN_DEFAULT_PATH(gnustepSystemRoot, @GNUSTEP_TARGET_SYSTEM_ROOT);
ASSIGN_DEFAULT_PATH(gnustepNetworkRoot, @GNUSTEP_TARGET_NETWORK_ROOT);
ASSIGN_DEFAULT_PATH(gnustepLocalRoot, @GNUSTEP_TARGET_LOCAL_ROOT);
ASSIGN_DEFAULT_PATH(gnustepSystemApps, @GNUSTEP_TARGET_SYSTEM_APPS);
ASSIGN_DEFAULT_PATH(gnustepSystemAdminApps, @GNUSTEP_TARGET_SYSTEM_ADMIN_APPS);
ASSIGN_DEFAULT_PATH(gnustepSystemTools, @GNUSTEP_TARGET_SYSTEM_TOOLS);
@ -789,11 +769,6 @@ static void InitialisePathUtilities(void)
*/
static void ShutdownPathUtilities(void)
{
DESTROY(gnustepSystemRoot);
DESTROY(gnustepNetworkRoot);
DESTROY(gnustepLocalRoot);
DESTROY(gnustepUserRoot);
DESTROY(gnustepUserHome);
DESTROY(gnustepUserDefaultsDir);
@ -1373,9 +1348,8 @@ NSFullUserName(void)
/**
* Return the path of the defaults directory for userName.<br />
* This examines the .GNUsteprc file in the home directory of the
* user for the GNUSTEP_DEFAULTS_ROOT or the GNUSTEP_USER_ROOT
* directory definitions, over-riding those in GNUstep.conf.
* This examines the GNUSTEP_USER_CONFIG_FILE for the specified user,
* with settings in it over-riding those in the main GNUstep.conf.
*/
NSString *
GSDefaultsRootForUser(NSString *userName)
@ -1748,7 +1722,7 @@ if (domainMask & mask) \
{
if (domainMask & NSUserDomainMask)
{
[paths addObject: gnustepUserRoot];
[paths addObject: gnustepUserHome];
}
}
break;
@ -1788,9 +1762,12 @@ if (domainMask & mask) \
case NSApplicationSupportDirectory:
{
ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"ApplicationSupport");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"ApplicationSupport");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"ApplicationSupport");
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"ApplicationSupport");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary,
@"ApplicationSupport");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary,
@"ApplicationSupport");
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary,
@"ApplicationSupport");
}
break;
@ -1838,8 +1815,10 @@ if (domainMask & mask) \
if (part) ADD_PATH(NSLocalDomainMask, gnustepLocalLibraries, part);
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibraries);
if (full) ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, full);
if (part) ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, part);
if (full)
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, full);
if (part)
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, part);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibraries);
if (full) ADD_PATH(NSSystemDomainMask, gnustepSystemLibraries, full);

18
configure vendored
View file

@ -2311,24 +2311,6 @@ cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_MAKEFILES "$GNUSTEP_MAKEFILES"
_ACEOF
GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_ROOT "$GNUSTEP_SYSTEM_ROOT"
_ACEOF
GNUSTEP_NETWORK_ROOT=`echo $GNUSTEP_NETWORK_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_ROOT "$GNUSTEP_NETWORK_ROOT"
_ACEOF
GNUSTEP_LOCAL_ROOT=`echo $GNUSTEP_LOCAL_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_ROOT "$GNUSTEP_LOCAL_ROOT"
_ACEOF
GNUSTEP_USER_DIR=`echo $GNUSTEP_USER_DIR|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF

View file

@ -362,18 +362,6 @@ GNUSTEP_MAKEFILES=`echo $GNUSTEP_MAKEFILES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_MAKEFILES,
"$GNUSTEP_MAKEFILES",
[Built in default value for GNUstep Makefiles])
GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_ROOT,
"$GNUSTEP_SYSTEM_ROOT",
[Built in default value for GNUstep system root])
GNUSTEP_NETWORK_ROOT=`echo $GNUSTEP_NETWORK_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_ROOT,
"$GNUSTEP_NETWORK_ROOT",
[Built in default value for GNUstep network root])
GNUSTEP_LOCAL_ROOT=`echo $GNUSTEP_LOCAL_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_ROOT,
"$GNUSTEP_LOCAL_ROOT",
[Built in default value for GNUstep local root])
GNUSTEP_USER_DIR=`echo $GNUSTEP_USER_DIR|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR,
"$GNUSTEP_USER_DIR",

View file

@ -1,6 +1,6 @@
%post
if [ $1 = 1 ]; then
# if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
# if [ -z "$GNUSTEP_MAKEFILES" ]; then
# . %{gs_root}/Library/Makefiles/GNUstep.sh
# fi