attached is just sort of an experiment in getting rid of GNUstep.sh to compile stuff don't know if i expect anything to come out of it really, but figured i'd send it
anyways :P

it uses pkg-config to store the environment variables so you'd need to setup
PKG_CONFIG_PATH to wherever
adds 2 configure options
--with-pkgconfig-path=whereever
--with-bootstrap-path=somewhere

for the rationale behind 'bootstrap-path' see
info -f make -n "Include"
where it talks about the makefile search paths.

you can set this to wherever and make and pass -I on the command line
to make if you want it installed somewhere outside of the builtin make search path

so if you set up the PATH to tools,
LD_LIBRARY_PATH (or whatever) to lib dirs
and PKG_CONFIG_PATH to the gnustep.pc

then change include $(GNUSTEP_MAKEFILES)/common.make
to include gnustep.make

which just gets the GNUSTEP_MAKEFILES from pkg-config then
include $(GNUSTEP_MAKEFILES)/common.make

now obviously people who want to have multiple GNUsteps installed
or GNUstep installed into non-system places like ~/ will have a bit more fiddling
to do than they do now,
both will need to fiddle with their PKG_CONFIG_PATH,
and install into ~/ (or something) will need to add -I to make or make an alias for make -I..

so whether this simplifies things or complicates things is a good question... in theory given the right install locations and what not you wouldn't have to do anything so it could
simplify those...


<pkg-config-stuff.diff>
Index: configure.ac
===================================================================
--- configure.ac        (revision 24410)
+++ configure.ac        (working copy)
@@ -224,6 +224,36 @@
 AC_SUBST(GNUSTEP_CONFIG_FILE)
 
 #---------------------------------------------------------------------
+# location of GNUstep make bootstrap makefile
+#---------------------------------------------------------------------
+
+AC_MSG_CHECKING([GNUstep make bootstrap location])
+AC_ARG_WITH(makefile-dir,[
+--with-bootstrap-path=PATH
+The location to install the bootstrap makefile gnustep.make],
+GNUSTEP_BOOTSTRAP_PATH=$withval,)
+if test "$GNUSTEP_BOOTSTRAP_PATH" = "" -o "$GNUSTEP_BOOTSTRAP_PATH" = "no"; 
then
+GNUSTEP_BOOTSTRAP_PATH="/usr/local/include";
+fi
+AC_MSG_RESULT($GNUSTEP_BOOTSTRAP_PATH)
+AC_SUBST(GNUSTEP_BOOTSTRAP_PATH)
+
+#---------------------------------------------------------------------
+# location of pkg-config path 
+#---------------------------------------------------------------------
+
+AC_MSG_CHECKING([pkg-config path location])
+AC_ARG_WITH(makefile-dir,[
+--with-pkgconfig-path=PATH
+The location to install the file gnustep.pc],
+GNUSTEP_PKGCONFIG_PATH=$withval,)
+if test "$GNUSTEP_PKGCONFIG_PATH" = "" -o "$GNUSTEP_PKGCONFIG_PATH" = "no"; 
then
+GNUSTEP_PKGCONFIG_PATH="/usr/local/lib/pkgconfig";
+fi
+AC_MSG_RESULT($GNUSTEP_PKGCONFIG_PATH)
+AC_SUBST(GNUSTEP_PKGCONFIG_PATH)
+
+#---------------------------------------------------------------------
 # Now read/import the existing configuration file, if any
 #---------------------------------------------------------------------
 
@@ -1060,7 +1090,7 @@
 #--------------------------------------------------------------------
 AC_CONFIG_FILES([config-noarch.make config.make openapp opentool 
 executable.template GNUmakefile GNUstep.conf GNUstep.sh GNUstep.csh fixpath.sh
-gnustep-make.spec])
+gnustep-make.spec gnustep.pc])
 AC_CONFIG_COMMANDS([default],
        [[chmod a+x openapp opentool fixpath.sh executable.template]],
        [[]])
Index: gnustep.pc.in
===================================================================
--- gnustep.pc.in       (revision 0)
+++ gnustep.pc.in       (revision 0)
@@ -0,0 +1,9 @@
+system_root= @GNUSTEP_SYSTEM_ROOT@
+user_root= ~/@GNUSTEP_USER_DIR@
+network_root= @GNUSTEP_NETWORK_ROOT@
+local_root= @GNUSTEP_LOCAL_ROOT@
+path_list= 
~/@GNUSTEP_USER_DIR@:@GNUSTEP_LOCAL_ROOT@:@GNUSTEP_SYSTEM_ROOT@:@GNUSTEP_NETWORK_ROOT@
+makefiles= @GNUSTEP_SYSTEM_ROOT@/Libraries/Makefiles
+Name: GNUstep
+Description: A Free software implementation of the OpenStep Specification.
+Version: @GNUSTEP_MAKE_VERSION@
Index: GNUmakefile.in
===================================================================
--- GNUmakefile.in      (revision 24410)
+++ GNUmakefile.in      (working copy)
@@ -45,6 +45,8 @@
 GNUSTEP_SYSTEM_ROOT = $(DESTDIR)@GNUSTEP_SYSTEM_ROOT@
 GNUSTEP_LOCAL_ROOT  = $(DESTDIR)@GNUSTEP_LOCAL_ROOT@
 GNUSTEP_NETWORK_ROOT = $(DESTDIR)@GNUSTEP_NETWORK_ROOT@
+GNUSTEP_BOOTSTRAP_PATH = $(DESTDIR)@GNUSTEP_BOOTSTRAP_PATH@
+GNUSTEP_PKGCONFIG_PATH = $(DESTDIR)@GNUSTEP_PKGCONFIG_PATH@
 makedir = $(DESTDIR)@GNUSTEP_MAKEFILES@
 srcdir = @srcdir@
 VPATH = @srcdir@
@@ -141,7 +143,8 @@
                $(makedir)/Master \
                $(makedir)/Instance \
                $(makedir)/Instance/Shared \
-               $(makedir)/Instance/Documentation)
+               $(makedir)/Instance/Documentation \
+               $(GNUSTEP_BOOTSTRAP_PATH))
        $(EC)(echo "Installing GNUstep configuration file in 
$(GNUSTEP_CONFIG_FILE)"; \
         $(srcdir)/mkinstalldirs "$(GNUSTEP_CONFIG_FILE_DIR)"; \
         $(INSTALL_DATA) GNUstep.conf "$(GNUSTEP_CONFIG_FILE)")
@@ -159,7 +162,7 @@
          $(INSTALL_PROGRAM) -m 755 GNUstep.csh $(makedir); \
          $(INSTALL_PROGRAM) -m 755 fixpath.sh $(makedir); \
          $(INSTALL_PROGRAM) -m 755 openapp $(tooldir); \
-         $(INSTALL_PROGRAM) -m 755 opentool $(tooldir))
+         $(INSTALL_PROGRAM) -m 755 opentool $(tooldir)) 
         $(EC)(echo "Installing makefiles"; \
           for f in $(MAKE_FILES); do \
             $(INSTALL_DATA) $(srcdir)/$$f $(makedir); \
@@ -180,7 +183,9 @@
           done; \
           $(INSTALL_DATA) executable.template $(makedir); \
           $(INSTALL_DATA) config-noarch.make $(makedir); \
-          $(INSTALL_DATA) config.make $(makedir)/$(GNUSTEP_TARGET_LDIR))
+          $(INSTALL_DATA) config.make $(makedir)/$(GNUSTEP_TARGET_LDIR); \
+          $(INSTALL_DATA) gnustep.make $(GNUSTEP_BOOTSTRAP_PATH); \
+          $(INSTALL_DATA) gnustep.pc $(GNUSTEP_PKGCONFIG_PATH))
         $(EC)($(srcdir)/mkinstalldirs $(GNUSTEP_SYSTEM_ROOT)/share; \
           $(INSTALL_DATA) $(srcdir)/config.site $(GNUSTEP_SYSTEM_ROOT)/share)
        $(EC)(if [ "@GNUSTEP_STRIP_MAKEFILES@" = "strip" ]; then \
Index: gnustep.make
===================================================================
--- gnustep.make        (revision 0)
+++ gnustep.make        (revision 0)
@@ -0,0 +1,6 @@
+GNUSTEP_MAKEFILES := $(shell pkg-config --variable makefiles)
+GNUSTEP_SYSTEM_ROOT := $(shell pkg-config --variable system_root)
+GNUSTEP_LOCAL_ROOT := $(shell pkg-config --variable local_root)
+GNUSTEP_USER_ROOT := $(shell pkg-config --variable user_root)
+
+include $(GNUSTEP_MAKEFILES)/common.make
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to