Implemented ./configure --enable-strict-v2-mode and a few other minor upgrades/changes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@25949 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2008-01-14 15:22:14 +00:00
parent 9e5e57ea9d
commit c0c25231f6
9 changed files with 402 additions and 101 deletions

View file

@ -1,3 +1,41 @@
2008-01-14 Nicola Pero <nicola.pero@meta-innovation.com>
* GNUmakefile.in: Disable built-in suffixes and vague % rules for
performance.
* GNUstep.csh.in: Fixed typo in line that sources
GNUSTEP_USER_CONFIG_FILE.
2008-01-14 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac: New option --enable-strict-v2-mode that can be
used when debugging/upgrading makefiles and software to test that
they do not rely on obsolete/deprecated gnustep-make v1 variables.
Define GNUSTEP_MAKE_STRICT_V2_MODE when the option is set.
* configure: Regenerated.
* config-noarch.make.in, GNUstep.sh.in,
GNUstep.csh.in (GNUSTEP_MAKE_STRICT_V2_MODE): New variable, set
from the --enable-strict-v2-mode config option.
* GNUmakefile.in: If special_prefix is used and we are in strict
v2 mode, abort with an error.
* GNUstep.sh.in: When in strict v2 mode, never export
GNUSTEP_*_ROOT, GNUSTEP_FLATTENED and GNUSTEP_PATHLIST; instead
actively unset them if they are set in the environment. Export
GNUSTEP_IS_FLATTENED, LIBRARY_COMBO and GNUSTEP_HOST_* only if
GNUSTEP_SH_EXPORT_ALL_VARIABLES is set.
* GNUstep.csh.in: When in strict v2 mode, never setenv any of the
GNUSTEP_*_ROOT, GNUSTEP_FLATTENED, GNUSTEP_PATHLIST,
GNUSTEP_IS_FLATTENED, LIBRARY_COMBO and GNUSTEP_HOST_* variables;
unset them if they are set in the environment.
* config-noarch.make.in: When in strict v2 mode, do not define
GNUSTEP_*_ROOT, GNUSTEP_USER_DIR and GNUSTEP_FLATTENED.
* GNUstep-reset.sh: Unset GNUSTEP_MAKE_STRICT_V2_MODE for safety.
* common.make: In strict v2 mode do not define
GNUSTEP_DOCUMENTATION, GNUSTEP_DOCUMENTATION_MAN and
GNUSTEP_DOCUMENTATION_INFO. In strict v2 mode, abort with an
error if INSTALL_ROOT_DIR or GNUSTEP_INSTALLATION_DIR is set.
Print an info line if strict v2 mode is turned on.
2008-01-14 Nicola Pero <nicola.pero@meta-innovation.com>
* GNUstep.sh.in: Dropped sourcing user

View file

@ -2,10 +2,10 @@
#
# Main GNUmakefile for the GNUstep GNUmakefile Package.
#
# Copyright (C) 1997-2006 Free Software Foundation, Inc.
# Copyright (C) 1997-2008 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Author: Nicola Pero <n.pero@mi.flashnet.it>
# Author: Nicola Pero <nicola.pero@meta-innovation.com>
#
# This file is part of the GNUstep Makefile Package.
#
@ -19,6 +19,30 @@
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Disable all built-in suffixes for performance.
.SUFFIXES:
# Disable all built-in rules with a vague % as target, for performance.
%: %.c
%: %.cpp
%: %.cc
%: %.C
(%): %
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%
#
# I've thought about using the Makefile package files
# to install the GNUmakefile package, a cool little recursion,
@ -36,7 +60,11 @@ DESTDIR =
# 'special_prefix' is an old alias for DESTDIR.
ifneq ($(special_prefix),)
$(warning "WARNING: special_prefix is deprecated. Please use DESTDIR instead")
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
$(error "ERROR: special_prefix is deprecated. Please use DESTDIR instead")
else
$(warning "WARNING: special_prefix is deprecated. Please use DESTDIR instead")
endif
DESTDIR = $(special_prefix)
endif

View file

@ -160,6 +160,7 @@ unset GNUSTEP_USER_DOC_INFO
# These should not defined, but might be if something goes wrong
# somewhere.
unset GNUSTEP_MAKE_STRICT_V2_MODE
unset GNUSTEP_USER_DIR_APPS
unset GNUSTEP_USER_DIR_ADMIN_APPS
unset GNUSTEP_USER_DIR_WEB_APPS

View file

@ -24,6 +24,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# When this is set to 'yes', strict gnustep-make v2 compatibility mode
# is turned on.
set GNUSTEP_MAKE_STRICT_V2_MODE=@GNUSTEP_MAKE_STRICT_V2_MODE@
#
# Read our configuration files
#
@ -81,7 +85,7 @@ if ( ${?GNUSTEP_USER_CONFIG_FILE} ) then
case /*: # An absolute path
if ( -e "${GNUSTEP_USER_CONFIG_FILE}" ) then
# See above for an explanation of the sed expression
eval `sed -e '/^[^#=][^#=]*=.*$/\\!d' -e 's/^\([^#=][^#=]*\)=\(.*\)$/setenv \1 \2;/' "${GNUSTEP_USER_CONFIG_FILE}"``
eval `sed -e '/^[^#=][^#=]*=.*$/\\!d' -e 's/^\([^#=][^#=]*\)=\(.*\)$/setenv \1 \2;/' "${GNUSTEP_USER_CONFIG_FILE}"`
endif
breaksw
default: # Something else
@ -94,22 +98,29 @@ endif
# Now, set any essential variable (that is not already set) to the
# built-in values.
if ( ! ${?GNUSTEP_SYSTEM_ROOT} ) then
setenv GNUSTEP_SYSTEM_ROOT "@GNUSTEP_SYSTEM_ROOT@"
if ( "${GNUSTEP_MAKE_STRICT_V2_MODE}" == "yes" ) then
unsetenv GNUSTEP_SYSTEM_ROOT
unsetenv GNUSTEP_LOCAL_ROOT
unsetenv GNUSTEP_NETWORK_ROOT
unsetenv GNUSTEP_FLATTENED
else
if ( ! ${?GNUSTEP_SYSTEM_ROOT} ) then
setenv GNUSTEP_SYSTEM_ROOT "@GNUSTEP_SYSTEM_ROOT@"
endif
if ( ! ${?GNUSTEP_LOCAL_ROOT} ) then
setenv GNUSTEP_LOCAL_ROOT "@GNUSTEP_LOCAL_ROOT@"
endif
if ( ! ${?GNUSTEP_NETWORK_ROOT} ) then
setenv GNUSTEP_NETWORK_ROOT "@GNUSTEP_NETWORK_ROOT@"
endif
# GNUSTEP_FLATTENED is obsolete, please use GNUSTEP_IS_FLATTENED
# instead
setenv GNUSTEP_FLATTENED "@GNUSTEP_FLATTENED@"
endif
if ( ! ${?GNUSTEP_LOCAL_ROOT} ) then
setenv GNUSTEP_LOCAL_ROOT "@GNUSTEP_LOCAL_ROOT@"
endif
if ( ! ${?GNUSTEP_NETWORK_ROOT} ) then
setenv GNUSTEP_NETWORK_ROOT "@GNUSTEP_NETWORK_ROOT@"
endif
# GNUSTEP_FLATTENED is obsolete, please use GNUSTEP_IS_FLATTENED
# instead
setenv GNUSTEP_FLATTENED "@GNUSTEP_FLATTENED@"
setenv GNUSTEP_IS_FLATTENED "@GNUSTEP_IS_FLATTENED@"
if ( ! ${?LIBRARY_COMBO} ) then
setenv LIBRARY_COMBO "@ac_cv_library_combo@"
@ -119,24 +130,29 @@ if ( ! ${?GNUSTEP_MAKEFILES} ) then
setenv GNUSTEP_MAKEFILES "@GNUSTEP_MAKEFILES@"
endif
if ( ! ${?GNUSTEP_USER_DIR} ) then
setenv GNUSTEP_USER_DIR "@GNUSTEP_USER_DIR@"
if ( "${GNUSTEP_MAKE_STRICT_V2_MODE}" == "yes" ) then
unsetenv GNUSTEP_USER_DIR
unsetenv GNUSTEP_USER_ROOT
else
if ( ! ${?GNUSTEP_USER_DIR} ) then
setenv GNUSTEP_USER_DIR "@GNUSTEP_USER_DIR@"
endif
#
# Set GNUSTEP_USER_ROOT which is the variable used in practice
#
switch ("${GNUSTEP_USER_DIR}")
case /*: # An absolute path
setenv GNUSTEP_USER_ROOT "${GNUSTEP_USER_DIR}"
breaksw
default: # Something else
setenv GNUSTEP_USER_ROOT "${GNUSTEP_HOME}/${GNUSTEP_USER_DIR}"
breaksw
endsw
unsetenv GNUSTEP_USER_DIR
endif
#
# Set GNUSTEP_USER_ROOT which is the variable used in practice
#
switch ("${GNUSTEP_USER_DIR}")
case /*: # An absolute path
setenv GNUSTEP_USER_ROOT "${GNUSTEP_USER_DIR}"
breaksw
default: # Something else
setenv GNUSTEP_USER_ROOT "${GNUSTEP_HOME}/${GNUSTEP_USER_DIR}"
breaksw
endsw
unsetenv GNUSTEP_USER_DIR
if ( "@GNUSTEP_MULTI_PLATFORM@" == "" ) then
setenv GNUSTEP_HOST "@target@"
setenv GNUSTEP_HOST_CPU "@clean_target_cpu@"
@ -184,8 +200,10 @@ endif
#
# Add the GNUstep tools directories to the path
#
if ( ! ${?GNUSTEP_PATHLIST} ) then
setenv GNUSTEP_PATHLIST `$GNUSTEP_MAKEFILES/print_unique_pathlist.sh "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" $fixup_paths`
if ( "${GNUSTEP_MAKE_STRICT_V2_MODE}" == "no" ) then
if ( ! ${?GNUSTEP_PATHLIST} ) then
setenv GNUSTEP_PATHLIST `$GNUSTEP_MAKEFILES/print_unique_pathlist.sh "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" $fixup_paths`
endif
endif
set GNUSTEP_TOOLS_PATHLIST=`$GNUSTEP_MAKEFILES/print_unique_pathlist.sh "$GNUSTEP_USER_TOOLS" "$GNUSTEP_LOCAL_TOOLS" "$GNUSTEP_NETWORK_TOOLS" "$GNUSTEP_SYSTEM_TOOLS" $fixup_paths`
@ -247,6 +265,17 @@ endif
unset gnustep_info_path
if ( "${GNUSTEP_MAKE_STRICT_V2_MODE}" == "yes" ) then
unsetenv GNUSTEP_IS_FLATTENED
unsetenv LIBRARY_COMBO
unsetenv GNUSTEP_HOST
unsetenv GNUSTEP_HOST_CPU
unsetenv GNUSTEP_HOST_VENDOR
unsetenv GNUSTEP_HOST_OS
endif
unset GNUSTEP_MAKE_STRICT_V2_MODE
if ( ! {$?GNUSTEP_KEEP_CONFIG_FILE} ) then
unsetenv GNUSTEP_CONFIG_FILE
endif
@ -310,3 +339,4 @@ unsetenv GNUSTEP_USER_DOC_INFO
unsetenv GNUSTEP_SYSTEM_USERS_DIR
unsetenv GNUSTEP_LOCAL_USERS_DIR
unsetenv GNUSTEP_NETWORK_USERS_DIR

View file

@ -68,6 +68,10 @@ if [ -n "$ZSH_VERSION" ]; then
fi
# When this is set to 'yes', strict gnustep-make v2 compatibility mode
# is turned on.
GNUSTEP_MAKE_STRICT_V2_MODE=@GNUSTEP_MAKE_STRICT_V2_MODE@
#
# Read our configuration files
#
@ -115,60 +119,91 @@ fi
# Now, set any essential variable (that is not already set) to the
# built-in values.
# This is deprecated and will be removed
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
fi
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
# In strict v2 mode, clean these obsolete variables in case the
# config file contains them. They shouldn't exist so unsetting
# them can't harm.
unset GNUSTEP_SYSTEM_ROOT
unset GNUSTEP_LOCAL_ROOT
unset GNUSTEP_NETWORK_ROOT
else
# This is deprecated and will be removed
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
fi
# This is deprecated and will be removed
if [ -z "$GNUSTEP_LOCAL_ROOT" ]; then
GNUSTEP_LOCAL_ROOT=@GNUSTEP_LOCAL_ROOT@
fi
# This is deprecated and will be removed
if [ -z "$GNUSTEP_LOCAL_ROOT" ]; then
GNUSTEP_LOCAL_ROOT=@GNUSTEP_LOCAL_ROOT@
fi
# This is deprecated and will be removed
if [ -z "$GNUSTEP_NETWORK_ROOT" ]; then
GNUSTEP_NETWORK_ROOT=@GNUSTEP_NETWORK_ROOT@
fi
# This is deprecated and will be removed
if [ -z "$GNUSTEP_NETWORK_ROOT" ]; then
GNUSTEP_NETWORK_ROOT=@GNUSTEP_NETWORK_ROOT@
fi
export GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT
export GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT
fi
# GNUSTEP_FLATTENED is obsolete, please use GNUSTEP_IS_FLATTENED
# instead
GNUSTEP_FLATTENED=@GNUSTEP_FLATTENED@
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
unset GNUSTEP_FLATTENED
else
GNUSTEP_FLATTENED=@GNUSTEP_FLATTENED@
export GNUSTEP_FLATTENED
fi
GNUSTEP_IS_FLATTENED=@GNUSTEP_IS_FLATTENED@
if [ -z "$LIBRARY_COMBO" ]; then
LIBRARY_COMBO=@ac_cv_library_combo@
fi
export GNUSTEP_IS_FLATTENED GNUSTEP_FLATTENED LIBRARY_COMBO
if [ ! "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
# Having these variables in the environment is deprecated and will
# be removed. But for now, if we are not in strict gnustep-make v2
# mode, then we always export these variables for
# backwards-compatibility.
export GNUSTEP_IS_FLATTENED LIBRARY_COMBO
# Else they are only exported if GNUSTEP_SH_EXPORT_ALL_VARIABLES
# is defined - at the end of the script.
fi
if [ -z "$GNUSTEP_MAKEFILES" ]; then
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
fi
export GNUSTEP_MAKEFILES
# GNUSTEP_USER_DIR is deprecated and will be removed
if [ -z "$GNUSTEP_USER_DIR" ]; then
GNUSTEP_USER_DIR=@GNUSTEP_USER_DIR@
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
# Make sure this is never set in gnustep-make v2 strict mode; it
# might have been set in the config file.
unset GNUSTEP_USER_DIR
unset GNUSTEP_USER_ROOT
else
# GNUSTEP_USER_DIR is deprecated and will be removed
if [ -z "$GNUSTEP_USER_DIR" ]; then
GNUSTEP_USER_DIR=@GNUSTEP_USER_DIR@
fi
#
# Set GNUSTEP_USER_ROOT which is the variable used in practice.
# GNUSTEP_USER_ROOT is deprecated and will be removed
#
case "$GNUSTEP_USER_DIR" in
/*) # An absolute path
GNUSTEP_USER_ROOT="$GNUSTEP_USER_DIR";;
*) # Something else
GNUSTEP_USER_ROOT="$GNUSTEP_HOME/$GNUSTEP_USER_DIR";;
esac
# This variable was used to set up GNUSTEP_USER_ROOT which is the one
# that is actually exported; we can now drop it from the environment.
unset GNUSTEP_USER_DIR
# This is deprecated and will be removed
export GNUSTEP_USER_ROOT
fi
#
# Set GNUSTEP_USER_ROOT which is the variable used in practice
# GNUSTEP_USER_ROOT is deprecated and will be removed
#
case "$GNUSTEP_USER_DIR" in
/*) # An absolute path
GNUSTEP_USER_ROOT="$GNUSTEP_USER_DIR";;
*) # Something else
GNUSTEP_USER_ROOT="$GNUSTEP_HOME/$GNUSTEP_USER_DIR";;
esac
# This variable was used to set up GNUSTEP_USER_ROOT which is the one
# that is actually exported; we can now drop it from the environment.
unset GNUSTEP_USER_DIR
# This is deprecated and will be removed
export GNUSTEP_USER_ROOT
# 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
@ -213,7 +248,14 @@ if [ -z "$GNUSTEP_HOST_OS" ]; then
GNUSTEP_HOST_OS=`$GNUSTEP_MAKEFILES/clean_os.sh $GNUSTEP_HOST_OS`
fi
export GNUSTEP_HOST GNUSTEP_HOST_CPU GNUSTEP_HOST_VENDOR GNUSTEP_HOST_OS
if [ ! "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
# These variables are deprecated for usage in shell scripts; you
# need to use gnustep-config to get them in a shell script.
export GNUSTEP_HOST GNUSTEP_HOST_CPU GNUSTEP_HOST_VENDOR GNUSTEP_HOST_OS
# Even in strict gnustep-make v2 mode, we export them at the end
# if explicitly requested to export all variables.
fi
# Now load in all the remaining paths
. $GNUSTEP_MAKEFILES/filesystem.sh
@ -233,16 +275,20 @@ if [ -z "$path_check" ]; then
fi
unset path_check
# GNUSTEP_PATHLIST is deprecated and will be removed.
#
# GNUSTEP_PATHLIST is like an abstract path-like shell variable, which
# can be used to search the gnustep directories - and in these
# scripts, it is also used to set up other shell variables
#
if [ -z "$GNUSTEP_PATHLIST" ]; then
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
unset GNUSTEP_PATHLIST
else
# GNUSTEP_PATHLIST is deprecated and will be removed.
#
# GNUSTEP_PATHLIST is like an abstract path-like shell variable, which
# can be used to search the gnustep directories - and in these
# scripts, it is also used to set up other shell variables
#
if [ -z "$GNUSTEP_PATHLIST" ]; then
GNUSTEP_PATHLIST=`$GNUSTEP_MAKEFILES/print_unique_pathlist.sh "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" $fixup_paths`
export GNUSTEP_PATHLIST
GNUSTEP_PATHLIST=`$GNUSTEP_MAKEFILES/print_unique_pathlist.sh "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" $fixup_paths`
export GNUSTEP_PATHLIST
fi
fi
#
@ -413,12 +459,19 @@ unset GNUSTEP_INFO_PATHLIST
# so it can print out all of the GNUstep variables.
#
if [ -n "$GNUSTEP_SH_EXPORT_ALL_VARIABLES" ]; then
export GNUSTEP_MAKE_STRICT_V2_MODE
unset GNUSTEP_KEEP_CONFIG_FILE GNUSTEP_KEEP_USER_CONFIG_FILE
export GNUSTEP_CONFIG_FILE GNUSTEP_USER_CONFIG_FILE
export GNUSTEP_USER_DEFAULTS_DIR
# Always export these variables even if in strict gnustep-make v2
# mode, so that for example gnustep-config can determine them.
export GNUSTEP_IS_FLATTENED LIBRARY_COMBO
export GNUSTEP_HOST GNUSTEP_HOST_CPU GNUSTEP_HOST_VENDOR GNUSTEP_HOST_OS
export GNUSTEP_SYSTEM_APPS GNUSTEP_SYSTEM_ADMIN_APPS GNUSTEP_SYSTEM_WEB_APPS GNUSTEP_SYSTEM_TOOLS GNUSTEP_SYSTEM_ADMIN_TOOLS
export GNUSTEP_SYSTEM_LIBRARY GNUSTEP_SYSTEM_HEADERS GNUSTEP_SYSTEM_LIBRARIES
export GNUSTEP_SYSTEM_DOC GNUSTEP_SYSTEM_DOC_MAN GNUSTEP_SYSTEM_DOC_INFO
@ -437,6 +490,16 @@ if [ -n "$GNUSTEP_SH_EXPORT_ALL_VARIABLES" ]; then
export GNUSTEP_SYSTEM_USERS_DIR GNUSTEP_LOCAL_USERS_DIR GNUSTEP_NETWORK_USERS_DIR
else
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
unset GNUSTEP_IS_FLATTENED
unset LIBRARY_COMBO
unset GNUSTEP_HOST
unset GNUSTEP_HOST_CPU
unset GNUSTEP_HOST_VENDOR
unset GNUSTEP_HOST_OS
fi
unset GNUSTEP_MAKE_STRICT_V2_MODE
# Unset these variables but only if we set them internally; keep
# them if they were already in the environment.

View file

@ -166,7 +166,11 @@ ifneq ($(GNUSTEP_INSTALLATION_DIR),)
# GNUstep filesystem rooted in GNUSTEP_INSTALLATION_DIR.
# This is not recommended since it does not work with custom
# filesystem configurations.
$(warning GNUSTEP_INSTALLATION_DIR is deprecated. Please use GNUSTEP_INSTALLATION_DOMAIN instead)
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
$(error GNUSTEP_INSTALLATION_DIR is deprecated. Please use GNUSTEP_INSTALLATION_DOMAIN instead)
else
$(warning GNUSTEP_INSTALLATION_DIR is deprecated. Please use GNUSTEP_INSTALLATION_DOMAIN instead)
endif
#
# DESTDIR allows you to relocate the entire installation somewhere else
@ -265,10 +269,16 @@ endif
# compatibility hack in place for about 4 years from now, so until
# Feb 2011.
#
GNUSTEP_DOCUMENTATION = $(GNUSTEP_DOC)
GNUSTEP_DOCUMENTATION_MAN = $(GNUSTEP_DOC_MAN)
GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOC_INFO)
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
# FIXME - these would be nice but needs careful testing
# GNUSTEP_DOCUMENTATION = $(error GNUSTEP_DOCUMENTATION is deprecated)
# GNUSTEP_DOCUMENTATION_MAN = $(error GNUSTEP_DOCUMENTATION_MAN is deprecated)
# GNUSTEP_DOCUMENTATION_INFO = $(error GNUSTEP_DOCUMENTATION_INF is deprecated)
else
GNUSTEP_DOCUMENTATION = $(GNUSTEP_DOC)
GNUSTEP_DOCUMENTATION_MAN = $(GNUSTEP_DOC_MAN)
GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOC_INFO)
endif
#
# INSTALL_ROOT_DIR is the obsolete way of relocating stuff. It used
@ -284,13 +294,25 @@ GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOC_INFO)
# Anyway, until all makefiles have been updated, we set INSTALL_ROOT_DIR for backwards
# compatibility.
#
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
ifneq ($(INSTALL_ROOT_DIR),)
$(error INSTALL_ROOT_DIR is deprecated in gnustep-make v2, please replace any instance of INSTALL_ROOT_DIR with DESTDIR)
endif
endif
ifneq ($(DESTDIR),)
ifeq ($(INSTALL_ROOT_DIR),)
INSTALL_ROOT_DIR = $(DESTDIR)
endif
endif
INSTALL_ROOT_DIR += $(warning INSTALL_ROOT_DIR is deprecated, please replace any instance of INSTALL_ROOT_DIR with DESTDIR)
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
# FIXME: Test that using 'error' here works reliably.
# INSTALL_ROOT_DIR += $(error INSTALL_ROOT_DIR is deprecated, please replace any instance of INSTALL_ROOT_DIR with DESTDIR)
INSTALL_ROOT_DIR += $(warning INSTALL_ROOT_DIR is deprecated, please replace any instance of INSTALL_ROOT_DIR with DESTDIR)
else
INSTALL_ROOT_DIR += $(warning INSTALL_ROOT_DIR is deprecated, please replace any instance of INSTALL_ROOT_DIR with DESTDIR)
endif
# The default name of the makefile to be used in recursive invocations of make
ifeq ($(MAKEFILE_NAME),)
@ -700,6 +722,9 @@ ifeq ($(MAKE_WITH_INFO_FUNCTION),yes)
# Use 'make quiet=yes' to disable the message
ifneq ($(quiet),yes)
$(info This is gnustep-make $(GNUSTEP_MAKE_VERSION). Type 'make print-gnustep-make-help' for help.)
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
$(info Running in gnustep-make version 2 strict mode.)
endif
endif
endif

View file

@ -37,6 +37,17 @@ GNUSTEP_MAKE_MINOR_VERSION=@GNUSTEP_MAKE_MINOR_VERSION@
GNUSTEP_MAKE_SUBMINOR_VERSION=@GNUSTEP_MAKE_SUBMINOR_VERSION@
GNUSTEP_MAKE_VERSION=@GNUSTEP_MAKE_VERSION@
# Enable or disable strict gnustep-make v2 mode. In strict
# gnustep-make v2 mode, we actively try to be backwards-incompatible
# with gnustep-make v1. This dangerous option is useful in
# test/development builds when you want to make sure your software has
# been properly updated to gnustep-make v2.
#
# If this option is set to 'yes', we enable strict gnustep-make v2
# mode. Else, it's ignored.
#
GNUSTEP_MAKE_STRICT_V2_MODE=@GNUSTEP_MAKE_STRICT_V2_MODE@
# The default library combination
default_library_combo = @ac_cv_library_combo@
@ -62,10 +73,19 @@ endif
# 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@
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
# FIXME: These should abort if the variables are ever evaluated, but
# it needs testing.
# GNUSTEP_SYSTEM_ROOT = $(error GNUSTEP_SYSTEM_ROOT is obsolete)
# GNUSTEP_LOCAL_ROOT = $(error GNUSTEP_LOCAL_ROOT is obsolete)
# GNUSTEP_NETWORK_ROOT = $(error GNUSTEP_NETWORK_ROOT is obsolete)
# GNUSTEP_USER_DIR = $(error GNUSTEP_USER_DIR is obsolete)
else
GNUSTEP_SYSTEM_ROOT = @GNUSTEP_SYSTEM_ROOT@
GNUSTEP_LOCAL_ROOT = @GNUSTEP_LOCAL_ROOT@
GNUSTEP_NETWORK_ROOT = @GNUSTEP_NETWORK_ROOT@
GNUSTEP_USER_DIR = @GNUSTEP_USER_DIR@
endif
# This includes the GNUstep configuration file, but only if it exists
-include $(GNUSTEP_CONFIG_FILE)
@ -90,20 +110,31 @@ endif
# GNUSTEP_FLATTENED is obsolete, please use GNUSTEP_IS_FLATTENED
# instead
GNUSTEP_FLATTENED = @GNUSTEP_FLATTENED@
ifeq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
# FIXME: Test that this is OK
# GNUSTEP_FLATTENED = $(error GNUSTEP_FLATTENED is obsolete)
else
GNUSTEP_FLATTENED = @GNUSTEP_FLATTENED@
endif
GNUSTEP_IS_FLATTENED = @GNUSTEP_IS_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)
ifneq ($(GNUSTEP_MAKE_STRICT_V2_MODE),yes)
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
else
# Path does no start with '/', try it as relative
GNUSTEP_USER_ROOT = $(GNUSTEP_HOME)/$(GNUSTEP_USER_DIR)
endif
# FIXME: Test that this is OK. When I use it, it seems to
# abort even if GNUSTEP_USER_ROOT is never referenced!
# GNUSTEP_USER_ROOT = $(error GNUSTEP_USER_ROOT is obsolete)
endif
# If multi-platform support is disabled, just use the hardcoded cpu,
# vendor and os determined when gnustep-make was configured. The

52
configure vendored
View file

@ -648,6 +648,7 @@ INSTALL_DATA
LN_S
TAR
CHOWN
GNUSTEP_MAKE_STRICT_V2_MODE
GNUSTEP_CONFIG_FILE
GNUSTEP_USER_CONFIG_FILE
GNUSTEP_USER_DEFAULTS_DIR
@ -1314,6 +1315,24 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-strict-v2-mode
Enable strict gnustep-make version 2 mode by default. Use this
option to have gnustep-make be aggressively backwards-incompatible
with gnustep-make version 1. You can use it when you are debugging /
upgrading your makefiles and software to gnustep-make version 2 and
want to test test that they do not depend on obsolete or deprecated
version 1 features and variables. Important: you must never ship
gnustep-make to end-users with --enable-strict-v2-mode as it would
cause extremely confusing and dangerous problems with software that
has not been updated to gnustep-make v2 yet. Use it only on test
builds or development machines to test that makefiles and software
have been updated. Make sure to use it extremely carefully with old
makefiles because it can produce unpredictable and dangerous results
(for examples, since GNUSTEP_SYSTEM_ROOT is undefined when using
--enable-strict-v2-mode, installing into GNUSTEP_SYSTEM_ROOT/Headers
would actually install into /Headers).
--enable-importing-config-file
Enable importing the existing system GNUstep configuration file.
Use this option to use an existing configuration file for
@ -3854,6 +3873,34 @@ fi
# GNUstep specific options follow
#-------------------------------------------------------------------
#-------------------------------------------------------------------
# Determine if we should enable strict gnustep-make v2 mode by default
#-------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking if we should enable strict gnustep-make version 2 mode by default" >&5
echo $ECHO_N "checking if we should enable strict gnustep-make version 2 mode by default... $ECHO_C" >&6; }
# Check whether --enable-strict-v2-mode was given.
if test "${enable_strict_v2_mode+set}" = set; then
enableval=$enable_strict_v2_mode; ac_cv_strict_v2_mode=$enableval
else
ac_cv_strict_v2_mode="no"
fi
if test "$ac_cv_strict_v2_mode" = "yes"; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; };
GNUSTEP_MAKE_STRICT_V2_MODE="yes"
{ echo "$as_me:$LINENO: WARNING: Use strict version 2 mode at your own risk; it must only be used on development/test systems" >&5
echo "$as_me: WARNING: Use strict version 2 mode at your own risk; it must only be used on development/test systems" >&2;}
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; };
GNUSTEP_MAKE_STRICT_V2_MODE="no"
fi
#-------------------------------------------------------------------
# Determine filesystem layout to use
#-------------------------------------------------------------------
@ -6420,6 +6467,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim
LN_S!$LN_S$ac_delim
TAR!$TAR$ac_delim
CHOWN!$CHOWN$ac_delim
GNUSTEP_MAKE_STRICT_V2_MODE!$GNUSTEP_MAKE_STRICT_V2_MODE$ac_delim
GNUSTEP_CONFIG_FILE!$GNUSTEP_CONFIG_FILE$ac_delim
GNUSTEP_USER_CONFIG_FILE!$GNUSTEP_USER_CONFIG_FILE$ac_delim
GNUSTEP_USER_DEFAULTS_DIR!$GNUSTEP_USER_DEFAULTS_DIR$ac_delim
@ -6446,7 +6494,6 @@ GNUSTEP_NETWORK_ADMIN_TOOLS!$GNUSTEP_NETWORK_ADMIN_TOOLS$ac_delim
GNUSTEP_NETWORK_LIBRARY!$GNUSTEP_NETWORK_LIBRARY$ac_delim
GNUSTEP_NETWORK_HEADERS!$GNUSTEP_NETWORK_HEADERS$ac_delim
GNUSTEP_NETWORK_LIBRARIES!$GNUSTEP_NETWORK_LIBRARIES$ac_delim
GNUSTEP_NETWORK_DOC!$GNUSTEP_NETWORK_DOC$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -6488,6 +6535,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
GNUSTEP_NETWORK_DOC!$GNUSTEP_NETWORK_DOC$ac_delim
GNUSTEP_NETWORK_DOC_INFO!$GNUSTEP_NETWORK_DOC_INFO$ac_delim
GNUSTEP_NETWORK_DOC_MAN!$GNUSTEP_NETWORK_DOC_MAN$ac_delim
GNUSTEP_LOCAL_APPS!$GNUSTEP_LOCAL_APPS$ac_delim
@ -6545,7 +6593,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View file

@ -189,6 +189,43 @@ fi
# GNUstep specific options follow
#-------------------------------------------------------------------
#-------------------------------------------------------------------
# Determine if we should enable strict gnustep-make v2 mode by default
#-------------------------------------------------------------------
AC_MSG_CHECKING([if we should enable strict gnustep-make version 2 mode by default])
AC_ARG_ENABLE(strict-v2-mode, [
--enable-strict-v2-mode
Enable strict gnustep-make version 2 mode by default. Use this
option to have gnustep-make be aggressively backwards-incompatible
with gnustep-make version 1. You can use it when you are debugging /
upgrading your makefiles and software to gnustep-make version 2 and
want to test test that they do not depend on obsolete or deprecated
version 1 features and variables. Important: you must never ship
gnustep-make to end-users with --enable-strict-v2-mode as it would
cause extremely confusing and dangerous problems with software that
has not been updated to gnustep-make v2 yet. Use it only on test
builds or development machines to test that makefiles and software
have been updated. Make sure to use it extremely carefully with old
makefiles because it can produce unpredictable and dangerous results
(for examples, since GNUSTEP_SYSTEM_ROOT is undefined when using
--enable-strict-v2-mode, installing into GNUSTEP_SYSTEM_ROOT/Headers
would actually install into /Headers).
],
ac_cv_strict_v2_mode=$enableval,
ac_cv_strict_v2_mode="no")
if test "$ac_cv_strict_v2_mode" = "yes"; then
AC_MSG_RESULT(yes);
GNUSTEP_MAKE_STRICT_V2_MODE="yes"
AC_MSG_WARN(Use strict version 2 mode at your own risk; it must only be used on development/test systems)
else
AC_MSG_RESULT(no);
GNUSTEP_MAKE_STRICT_V2_MODE="no"
fi
AC_SUBST(GNUSTEP_MAKE_STRICT_V2_MODE)
#-------------------------------------------------------------------
# Determine filesystem layout to use
#-------------------------------------------------------------------