Fixed problems in the config system by separating platform-dependent and platform-independent information

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@23549 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2006-09-18 20:29:28 +00:00
parent 55bdf21640
commit b8add68872
7 changed files with 193 additions and 143 deletions

View file

@ -1,3 +1,31 @@
2006-09-18 Nicola Pero <nicola.pero@meta-innovation.com>
Separated out global config from platform-specific config.
* GNUmakefile.in: Include config-noarch-make before config.make.
(install): Install config-noarch.make.
(uninstall): Uninstall config-noarch.make.
(distclean): Remove config-noarch.make.
(generated-files): Added config-noarch.make.
(config.make): Do not depend on Version.
(config-noarch.make): New rule to build config-noarch.make
from config-noarch.make.in.
* config-noarch.make.in: New file created from the bits of
config.make.in that are global and don't depend on the platform.
* config.make.in: Removed global bits.
* configure.ac (AC_CONFIG_FILES): Added config-noarch.make.
* configure: Regenerated.
* common.make: Include config-noarch.make before names.make.
* common.make: Fixed inclusion of names.make that should
follow the definition of CONFIG_GUESS_SCRIPT etc.
* common.make: Include library-combo.make before config.make
else the library-combo directory can't be found.
* common.make (GNUSTEP_MAKEFILES): Do not waste time trying to set
if not set. GNUSTEP_MAKEFILES must be set, else nothing would
work.
2006-09-13 Nicola Pero <nicola.pero@meta-innovation.com>
* Master/rpm.make (before-install) If filelist=yes, depend on

View file

@ -2,7 +2,7 @@
#
# Main GNUmakefile for the GNUstep GNUmakefile Package.
#
# Copyright (C) 1997-2002 Free Software Foundation, Inc.
# Copyright (C) 1997-2006 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Author: Nicola Pero <n.pero@mi.flashnet.it>
@ -25,6 +25,7 @@
# but there is nothing to made, and the files get installed
# in a special directory, so it was simpler this way.
#
include config-noarch.make
include config.make
@ -169,6 +170,7 @@ install: generated-files
$(makedir)/Instance/Documentation; \
done; \
$(INSTALL_DATA) executable.template $(makedir); \
$(INSTALL_DATA) config-noarch.make $(makedir); \
$(INSTALL_DATA) config.make $(makedir)/$(GNUSTEP_TARGET_LDIR))
$(EC)($(srcdir)/mkinstalldirs $(GNUSTEP_SYSTEM_ROOT)/share; \
$(INSTALL_DATA) $(srcdir)/config.site $(GNUSTEP_SYSTEM_ROOT)/share)
@ -220,6 +222,7 @@ uninstall:
done
rm -f $(makedir)/executable.template
rm -f $(GNUSTEP_SYSTEM_ROOT)/share/config.site
rm -f $(makedir)/config-noarch.make
rm -f $(makedir)/$(GNUSTEP_TARGET_LDIR)/config.make
-for f in $(makedir)/$(GNUSTEP_TARGET_CPU) \
$(makedir)/$(GNUSTEP_TARGET_DIR) \
@ -237,7 +240,7 @@ clean:
rm -f *~ Master/*~ Instance/*~ Instance/Shared/*~
distclean: clean
rm -f GNUmakefile config.make config.h
rm -f GNUmakefile config-noarch.make config.make config.h
rm -f config.cache config.log config.status
rm -f openapp
rm -f debugapp
@ -301,7 +304,7 @@ rpm: test-RPM_TOPDIR dist
fi; \
$${rpmbuild} -ba gnustep-make.spec
generated-files: GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh config.make debugapp openapp opentool gnustep-make.spec executable.template
generated-files: GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh config-noarch.make config.make debugapp openapp opentool gnustep-make.spec executable.template
GNUmakefile: GNUmakefile.in config.status
$(SHELL) config.status
@ -315,7 +318,10 @@ GNUstep.csh: GNUstep.csh.in
fixpath.sh: fixpath.sh.in
$(SHELL) config.status
config.make: config.make.in Version
config-noarch.make: config-noarch.make.in Version
$(SHELL) config.status --recheck
config.make: config.make.in
$(SHELL) config.status --recheck
debugapp: debugapp.in

View file

@ -26,27 +26,28 @@ COMMON_MAKE_LOADED = yes
SHELL = /bin/sh
###
### FIXME - this is broken, just a reminder for me (Nicola)
###
### We want everything to work when you have just set
### GNUSTEP_CONFIG_FILE and GNUSTEP_MAKEFILES ... or even
### better, just GNUSTEP_MAKEFILES :-)
###
### So we need to read the GNUSTEP_CONFIG_FILE first to
### get all the other information.
### Before reading GNUSTEP_CONFIG_FILE, we can't know
### if this needs to be flattened or not, or what
### the target/host is!
###
### Unfortunately, if GNUSTEP_CONFIG_FILE is read by
### config.make, we are in trouble, because config.make
### is itself in a directory keyed by GNUSTEP_TARGET_LDIR,
### and we don't know the value of GNUSTEP_TARGET_LDIR
### until we read GNUSTEP_CONFIG_FILE!
###
### Hmmm.
###
#
# Get the global config information. This includes
# GNUSTEP_SYSTEM_ROOT, GNUSTEP_MAKE_VERSION, GNUSTEP_FLATTENED,
# default_library_combo, and, if multi-platform support is disabled,
# it will also load GNUSTEP_HOST, GNUSTEP_HOST_CPU, etc.
#
include $(GNUSTEP_MAKEFILES)/config-noarch.make
#
# Scripts to run for parsing canonical names
#
CONFIG_GUESS_SCRIPT = $(GNUSTEP_MAKEFILES)/config.guess
CONFIG_SUB_SCRIPT = $(GNUSTEP_MAKEFILES)/config.sub
CONFIG_CPU_SCRIPT = $(GNUSTEP_MAKEFILES)/cpu.sh
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_MAKEFILES)/vendor.sh
CONFIG_OS_SCRIPT = $(GNUSTEP_MAKEFILES)/os.sh
CLEAN_CPU_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_cpu.sh
CLEAN_VENDOR_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_vendor.sh
CLEAN_OS_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_os.sh
LD_LIB_PATH_SCRIPT = $(GNUSTEP_MAKEFILES)/ld_lib_path.sh
TRANSFORM_PATHS_SCRIPT = $(GNUSTEP_MAKEFILES)/transform_paths.sh
REL_PATH_SCRIPT = $(GNUSTEP_MAKEFILES)/relative_path.sh
#
# Determine the compilation host and target
@ -65,8 +66,11 @@ else
GNUSTEP_TARGET_LDIR = .
endif
# Then, work out precisely library combos etc
include $(GNUSTEP_MAKEFILES)/library-combo.make
#
# Get the config information (host/target specific),
# Get the config information (host/target/library-combo specific),
# this includes GNUSTEP_SYSTEM_ROOT etc.
#
include $(GNUSTEP_MAKEFILES)/$(GNUSTEP_TARGET_LDIR)/config.make
@ -81,26 +85,6 @@ ifeq ($(GNUSTEP_BUILD_DIR),)
GNUSTEP_BUILD_DIR = .
endif
#
# Scripts to run for parsing canonical names
#
CONFIG_GUESS_SCRIPT = $(GNUSTEP_MAKEFILES)/config.guess
CONFIG_SUB_SCRIPT = $(GNUSTEP_MAKEFILES)/config.sub
CONFIG_CPU_SCRIPT = $(GNUSTEP_MAKEFILES)/cpu.sh
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_MAKEFILES)/vendor.sh
CONFIG_OS_SCRIPT = $(GNUSTEP_MAKEFILES)/os.sh
CLEAN_CPU_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_cpu.sh
CLEAN_VENDOR_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_vendor.sh
CLEAN_OS_SCRIPT = $(GNUSTEP_MAKEFILES)/clean_os.sh
LD_LIB_PATH_SCRIPT = $(GNUSTEP_MAKEFILES)/ld_lib_path.sh
TRANSFORM_PATHS_SCRIPT = $(GNUSTEP_MAKEFILES)/transform_paths.sh
REL_PATH_SCRIPT = $(GNUSTEP_MAKEFILES)/relative_path.sh
# Take the makefiles from the system root
ifeq ($(GNUSTEP_MAKEFILES),)
GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Library/Makefiles
endif
#
# Sanity checks - only performed at the first make invocation
#
@ -157,8 +141,6 @@ include $(GNUSTEP_MAKEFILES)/messages.make
# Get flags/config options for core libraries
#
# First, work out precisely library combos etc
include $(GNUSTEP_MAKEFILES)/library-combo.make
# Then include custom makefiles with flags/config options
# This is meant to be used by the core libraries to override loading
# of the system makefiles from $(GNUSTEP_MAKEFILES)/Additional/*.make

120
config-noarch.make.in Normal file
View file

@ -0,0 +1,120 @@
#
# config-noarch.make.in
#
# The settings required by the makefile package that are determined
# by configure but that are independent of the platform that we
# are working on (keep in mind we can support multiple platforms
# being used at the same time!).
#
# In practice, this file should containg global gnustep-make options
# (like GNUSTEP_FLATTENED or GNUSTEP_SYSTEM_ROOT), as opposed to
# config info needed to build or compile or do things on a certain
# platform (like CC or OPTFLAG), which should go into config.make
#
# Copyright (C) 1997-2006 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Author: Ovidiu Predescu <ovidiu@net-community.com>
# Author: Nicola Pero <n.pero@mi.flashnet.it>
#
# 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,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The GNUstep Make Package Version
#
GNUSTEP_MAKE_MAJOR_VERSION=@GNUSTEP_MAKE_MAJOR_VERSION@
GNUSTEP_MAKE_MINOR_VERSION=@GNUSTEP_MAKE_MINOR_VERSION@
GNUSTEP_MAKE_SUBMINOR_VERSION=@GNUSTEP_MAKE_SUBMINOR_VERSION@
GNUSTEP_MAKE_VERSION=@GNUSTEP_MAKE_VERSION@
# The default library combination
default_library_combo = @ac_cv_library_combo@
#
# Location of GNUstep's config file for this installation
#
# Warning - the base library's configure.in will extract the GNUstep
# config file location from the following line using grep/sed - so if
# you change the following lines you *need* to update the base library
# configure.in too.
#
# PS: At run-time, this can be overridden on the command-line, or
# via an environment variable.
ifeq ($(GNUSTEP_CONFIG_FILE),)
GNUSTEP_CONFIG_FILE = @GNUSTEP_CONFIG_FILE@
endif
#
# Now we set up the environment and everything by reading the GNUstep
# configuration file(s).
#
# These are the defaults value ... they will be used only if they are
# not set in the config files (or on the command-line or in
# environment).
GNUSTEP_SYSTEM_ROOT = @GNUSTEP_SYSTEM_ROOT@
GNUSTEP_LOCAL_ROOT = @GNUSTEP_LOCAL_ROOT@
GNUSTEP_NETWORK_ROOT = @GNUSTEP_NETWORK_ROOT@
GNUSTEP_USER_DIR = @GNUSTEP_USER_DIR@
# This includes the GNUstep configuration file, but only if it exists
-include $(GNUSTEP_CONFIG_FILE)
# FIXME: determining GNUSTEP_HOME
GNUSTEP_HOME = $(HOME)
# Read the user configuration file ... unless it is disabled (ie, set
# to an empty string)
ifneq ($(GNUSTEP_USER_CONFIG_FILE),)
# FIXME - Checking for relative vs. absolute paths!
ifneq ($(filter /%, $(GNUSTEP_USER_CONFIG_FILE)),)
# Path starts with '/', consider it absolute
-include $(GNUSTEP_USER_CONFIG_FILE)
else
# Path does no start with '/', try it as relative
-include $(GNUSTEP_HOME)/$(GNUSTEP_USER_CONFIG_FILE)
endif
endif
GNUSTEP_FLATTENED = @GNUSTEP_FLATTENED@
#
# Set GNUSTEP_USER_ROOT from GNUSTEP_USER_DIR; GNUSTEP_USER_ROOT is
# the variable used in practice
#
ifneq ($(filter /%, $(GNUSTEP_USER_DIR)),)
# Path starts with '/', consider it absolute
GNUSTEP_USER_ROOT = $(GNUSTEP_USER_DIR)
else
# Path does no start with '/', try it as relative
GNUSTEP_USER_ROOT = $(GNUSTEP_HOME)/$(GNUSTEP_USER_DIR)
endif
# If multi-platform support is disabled, just use the hardcoded cpu,
# vendor and os determined when gnustep-make was configured. The
# reason using the hardcoded ones might be better is that config.guess
# and similar scripts might even require compiling test files to
# determine the platform - which is horribly slow (that is done in
# names.make if GNUSTEP_HOST is not yet set at that stage). To
# prevent this problem, unless we were configured to determine the
# platform at run time, by default we use the hardcoded values of
# GNUSTEP_HOST*.
ifeq ("@GNUSTEP_MULTI_PLATFORM@","")
GNUSTEP_HOST = @target@
GNUSTEP_HOST_CPU = @clean_target_cpu@
GNUSTEP_HOST_VENDOR = @clean_target_vendor@
GNUSTEP_HOST_OS = @clean_target_os@
endif

View file

@ -1,10 +1,13 @@
#
# config.make.in
#
# All of the settings required by the makefile package
# that are determined by configure.
# The settings required by the makefile package that are determined
# by configure and that depend on the platform. There might be
# multiple of those files installed in different platform-specific
# directories. Global settings that are common to all platforms
# should go in config-noarch.make.in instead.
#
# Copyright (C) 1997-2005 Free Software Foundation, Inc.
# Copyright (C) 1997-2006 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Author: Ovidiu Predescu <ovidiu@net-community.com>
@ -22,14 +25,6 @@
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The GNUstep Make Package Version
#
GNUSTEP_MAKE_MAJOR_VERSION=@GNUSTEP_MAKE_MAJOR_VERSION@
GNUSTEP_MAKE_MINOR_VERSION=@GNUSTEP_MAKE_MINOR_VERSION@
GNUSTEP_MAKE_SUBMINOR_VERSION=@GNUSTEP_MAKE_SUBMINOR_VERSION@
GNUSTEP_MAKE_VERSION=@GNUSTEP_MAKE_VERSION@
#
# Binary and compile tools
#
@ -123,9 +118,6 @@ MKDIRS = $(GNUSTEP_MAKEFILES)/mkinstalldirs
CC_CPPPRECOMP = @cc_cppprecomp@
CC_BUNDLE = @cc_bundle@
# The default library combination
default_library_combo = @ac_cv_library_combo@
# Backend bundle
BACKEND_BUNDLE=@BACKEND_BUNDLE@
@ -158,82 +150,3 @@ AUTO_DEPENDENCIES = @AUTO_DEPENDENCIES@
# @try/@catch/@finally/@throw.
#
USE_OBJC_EXCEPTIONS = @USE_OBJC_EXCEPTIONS@
#
# Location of GNUstep's config file for this installation
#
# Warning - the base library's configure.in will extract the GNUstep
# config file location from the following line using grep/sed - so if
# you change the following lines you *need* to update the base library
# configure.in too.
#
# PS: At run-time, this can be overridden on the command-line, or
# via an environment variable.
ifeq ($(GNUSTEP_CONFIG_FILE),)
GNUSTEP_CONFIG_FILE = @GNUSTEP_CONFIG_FILE@
endif
#
# Now we set up the environment and everything by reading the GNUstep
# configuration file(s).
#
# These are the defaults value ... they will be used only if they are
# not set in the config files (or on the command-line or in
# environment).
GNUSTEP_SYSTEM_ROOT = @GNUSTEP_SYSTEM_ROOT@
GNUSTEP_LOCAL_ROOT = @GNUSTEP_LOCAL_ROOT@
GNUSTEP_NETWORK_ROOT = @GNUSTEP_NETWORK_ROOT@
GNUSTEP_USER_DIR = @GNUSTEP_USER_DIR@
# This includes the GNUstep configuration file, but only if it exists
-include $(GNUSTEP_CONFIG_FILE)
# FIXME: determining GNUSTEP_HOME
GNUSTEP_HOME = $(HOME)
# Read the user configuration file ... unless it is disabled (ie, set
# to an empty string)
ifneq ($(GNUSTEP_USER_CONFIG_FILE),)
# FIXME - Checking for relative vs. absolute paths!
ifneq ($(filter /%, $(GNUSTEP_USER_CONFIG_FILE)),)
# Path starts with '/', consider it absolute
-include $(GNUSTEP_USER_CONFIG_FILE)
else
# Path does no start with '/', try it as relative
-include $(GNUSTEP_HOME)/$(GNUSTEP_USER_CONFIG_FILE)
endif
endif
GNUSTEP_FLATTENED = @GNUSTEP_FLATTENED@
#
# Set GNUSTEP_USER_ROOT from GNUSTEP_USER_DIR; GNUSTEP_USER_ROOT is
# the variable used in practice
#
ifneq ($(filter /%, $(GNUSTEP_USER_DIR)),)
# Path starts with '/', consider it absolute
GNUSTEP_USER_ROOT = $(GNUSTEP_USER_DIR)
else
# Path does no start with '/', try it as relative
GNUSTEP_USER_ROOT = $(GNUSTEP_HOME)/$(GNUSTEP_USER_DIR)
endif
# If multi-platform support is disabled, just use the hardcoded cpu,
# vendor and os determined when gnustep-make was configured. The
# reason using the hardcoded ones might be better is that config.guess
# and similar scripts might even require compiling test files to
# determine the platform - which is horribly slow (that is done in
# names.make if GNUSTEP_HOST is not yet set at that stage). To
# prevent this problem, unless we were configured to determine the
# platform at run time, by default we use the hardcoded values of
# GNUSTEP_HOST*.
ifeq ("@GNUSTEP_MULTI_PLATFORM@","")
GNUSTEP_HOST = @target@
GNUSTEP_HOST_CPU = @clean_target_cpu@
GNUSTEP_HOST_VENDOR = @clean_target_vendor@
GNUSTEP_HOST_OS = @clean_target_os@
endif

3
configure vendored
View file

@ -4396,7 +4396,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.conf GNUstep.sh GNUstep.csh fixpath.sh gnustep-make.spec"
ac_config_files="$ac_config_files config-noarch.make config.make openapp debugapp opentool executable.template GNUmakefile GNUstep.conf GNUstep.sh GNUstep.csh fixpath.sh gnustep-make.spec"
ac_config_commands="$ac_config_commands default"
@ -4961,6 +4961,7 @@ for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"config-noarch.make" ) CONFIG_FILES="$CONFIG_FILES config-noarch.make" ;;
"config.make" ) CONFIG_FILES="$CONFIG_FILES config.make" ;;
"openapp" ) CONFIG_FILES="$CONFIG_FILES openapp" ;;
"debugapp" ) CONFIG_FILES="$CONFIG_FILES debugapp" ;;

View file

@ -967,7 +967,7 @@ AC_SUBST(target)
#--------------------------------------------------------------------
# Produce the output files
#--------------------------------------------------------------------
AC_CONFIG_FILES([config.make openapp debugapp opentool
AC_CONFIG_FILES([config-noarch.make config.make openapp debugapp opentool
executable.template GNUmakefile GNUstep.conf GNUstep.sh GNUstep.csh fixpath.sh
gnustep-make.spec])
AC_CONFIG_COMMANDS([default],