diff --git a/ChangeLog b/ChangeLog index 586e5e836..c5f9089a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2009-01-06 Nicola Pero + + * config.mak.in: Check here if GNUSTEP_BASE_DOMAIN and + GNUSTEP_INSTALLATION_DOMAIN do not match when using relative + paths. If they do not match, print a long explanation of how to + fix the problem, and abort. If relative paths are not used, + automatically set GNUSTEP_INSTALLATION_DOMAIN to the domain that + was chosen at configure time - unless overridden on the command + line. + * Makefile.postamble: Removed before-all rule that was doing the + check now in config.mak.in. + + * SSL/Makefile.postamble (config.mak): Touch config.mak after + running config.status to prevent spurious invocations of + config.status. + (config.h): Always touch config.h after running config.status for + the same reason. + 2009-01-06 Nicola Pero * configure.ac: Detect relative paths in the paths that we diff --git a/Makefile.postamble b/Makefile.postamble index c9d94df3c..dfe137140 100644 --- a/Makefile.postamble +++ b/Makefile.postamble @@ -33,33 +33,7 @@ # # Things to do before compiling -# Make sure the domain that we are installing into matches the domain that -# we were configured with (in case NSPathUtilities is using paths relative -# to the location of the gnustep config file or the base library ... usually -# the case on ms-windows, sometimes the case on unix). -# If they don't match, print an error message and reconfigure. -# -# Important: please note that this is a ugly hack. At install time, -# we are most likely running as root/superuser. So, if we recompile -# part of gnustep-base as root/superuser, we create -# root/superuser-owned files, which means when you go back to being a -# normal user, you can't recompile and you can't even make clean. You -# have to manually become root again, make a distclean, and start again. -# -# So we avoid this 'reconfiguration at install time' whenever -# possible. In fact maybe we should just print an error here, and -# not try to reconfigure. -# -ifeq ($(GNUSTEP_BASE_RELATIVE_PATHS), yes) -before-all:: - $(ECHO_NOTHING)if [ "$(GNUSTEP_BASE_DOMAIN)" != "$(GNUSTEP_INSTALLATION_DOMAIN)" ]; \ - then \ - echo " "; \ - echo "GNUSTEP_INSTALLATION_DOMAIN does not match GNUSTEP_BASE_DOMAIN; reconfiguring"; \ - echo " "; \ - GNUSTEP_INSTALLATION_DOMAIN=$(GNUSTEP_INSTALLATION_DOMAIN) ./config.status --recheck; \ - fi$(END_ECHO) -endif +#before-all:: # Things to do after compiling # after-all:: @@ -119,4 +93,3 @@ base.make: base.make.in config.mak: config.mak.in ./configure - diff --git a/SSL/Makefile.postamble b/SSL/Makefile.postamble index 4508bf8a2..8c4958063 100644 --- a/SSL/Makefile.postamble +++ b/SSL/Makefile.postamble @@ -77,16 +77,17 @@ after-distclean:: config.mak: config.mak.in config.status ./config.status + -touch config.mak # # The config.h file is specific to a target # $(GNUSTEP_TARGET_DIR)/config.h: config.status ./config.status + -touch config.h ifneq ($(GNUSTEP_TARGET_DIR), .) $(MKDIRS) $(GNUSTEP_TARGET_DIR) -mv config.h $(GNUSTEP_TARGET_DIR) - -touch $(GNUSTEP_TARGET_DIR)/config.h endif # Run configure manually if you need to pass any options diff --git a/config.mak.in b/config.mak.in index 4703b0855..33a55000c 100644 --- a/config.mak.in +++ b/config.mak.in @@ -40,3 +40,41 @@ ifneq ($(FOUNDATION_LIB),gnu) add=yes base=no endif + + +ifeq ($(GNUSTEP_BASE_RELATIVE_PATHS), yes) +ifneq ($(GNUSTEP_BASE_DOMAIN), $(GNUSTEP_INSTALLATION_DOMAIN)) +$(warning "Error: GNUSTEP_INSTALLATION_DOMAIN does not match GNUSTEP_BASE_DOMAIN") +$(warning " ") +$(warning "You can install gnustep-base in one of the four domains: SYSTEM, LOCAL, NETWORK or USER.") +$(warning " ") +$(warning "gnustep-base was configured to be installed into: $(GNUSTEP_BASE_DOMAIN)") +$(warning "but it would now being installed into: $(GNUSTEP_INSTALLATION_DOMAIN)") +$(warning "That's not right; they must match.") +$(warning " ") +$(warning "If you want to install into $(GNUSTEP_BASE_DOMAIN), please use") +$(warning " ") +$(warning " make install GNUSTEP_INSTALLATION_DOMAIN=$(GNUSTEP_BASE_DOMAIN) [plus any other options you need]") +$(warning " ") +$(warning "Instead, if you want to install into $(GNUSTEP_INSTALLATION_DOMAIN), please reconfigure") +$(warning "gnustep-base by doing") +$(warning " ") +$(warning " ./configure --with-installation-domain=$(GNUSTEP_INSTALLATION_DOMAIN) [plus any other options you need]") +$(warning " ") +$(warning "and then recompile and reinstall.") + +# We used to automatically rerun configure here. Unfortunately we +# don't know if the right domain that we should be installing into is +# GNUSTEP_BASE_DOMAIN (specified or automatically picked up by +# configure) or GNUSTEP_INSTALLATION_DOMAIN (specified or +# automatically picked up by make install) so the user really has to +# spend two minutes checking this and fixing it herself. + +$(error "Please fix the installation domain then try again. If you are stuck, contact discuss-gnustep@gnu.org for help.") +endif +endif + +# They can override this setting on the command-line; if nothing is +# specified, by default install into the domain chosen at configure +# time. +GNUSTEP_INSTALLATION_DOMAIN = $(GNUSTEP_BASE_DOMAIN)