[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] two small patches for Solaris
From: |
MAISONOBE Luc |
Subject: |
[Gcl-devel] two small patches for Solaris |
Date: |
Fri, 31 Oct 2003 12:34:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.3) Gecko/20030507 |
Hello,
I have encountered two portability problems with gcl 2.5.3 on a Solaris
machine.
The first one is the use of "-q" option of the grep command. This option
does not exist on the stock Solaris grep. I followed the advice found on
the GNU grep man page: "Shell scripts intended to be portable to
traditional grep should avoid both -q and -s and should redirect
output to /dev/null instead".
The first patch proposed does just that, replace the "-q" option with a
shell redirection.
The second problem is related to the line :
export C_INCLUDE_PATH=/some/configured/path/here/h:$C_INCLUDE_PATH
which is at the beginning of the gcl wrapper script, where
/some/configured/path/here depends on the user choice during
configuration step.
Defining a shell variable and exporting it as an environment variable in
the same command is supported by bash and ksh, but not by the stock
Solaris Bourne shell.
The second patch uses two lines to first define the C_INCLUDE_PATH
variable and second export it as an environment variable.
Note that since the second patch modifies a line that is also modified
by the first patch, it should be applied afterward.
With these patches, I can compile and install gcl. However, I still have
problems compiling maxima on Solaris with gcl (despite I have no problem
at all with GNU/Linux).
hope this helps
Luc
diff -u -r -N gcl-2.5.3.orig/info/makefile gcl-2.5.3/info/makefile
--- gcl-2.5.3.orig/info/makefile Fri Jan 24 19:55:23 2003
+++ gcl-2.5.3/info/makefile Fri Oct 31 12:14:05 2003
@@ -60,11 +60,11 @@
install:
mkdir -p $(DESTDIR)${INFO_DIR}
[ -f $(DESTDIR)$(INFO_DIR)dir ] || touch $(DESTDIR)$(INFO_DIR)dir
- ! grep -q gcl-si $(DESTDIR)${INFO_DIR}dir || \
+ ! grep gcl-si $(DESTDIR)${INFO_DIR}dir > /dev/null 2>&1 || \
echo "* GCL Doc: (gcl-si.info). GNU Common Lisp specific
Documentation." >> $(DESTDIR)${INFO_DIR}dir
- ! grep -q gcl-tk $(DESTDIR)${INFO_DIR}dir || \
+ ! grep gcl-tk $(DESTDIR)${INFO_DIR}dir > /dev/null 2>&1 || \
echo "* GCL TK Doc: (gcl-tk.info). TK window GCL interface." >>
$(DESTDIR)${INFO_DIR}dir
- ! grep -q gcl.info $(DESTDIR)${INFO_DIR}dir || \
+ ! grep gcl.info $(DESTDIR)${INFO_DIR}dir > /dev/null 2>&1 || \
echo "* GCL Ansi Doc: (gcl.info). Ansi Common Lisp Specification." >>
$(DESTDIR)${INFO_DIR}dir
cp *.info* $(DESTDIR)${INFO_DIR}
mkdir -p $(DESTDIR)$(INFO_DIR)../doc/gcl-doc/gcl.html
diff -u -r -N gcl-2.5.3.orig/makefile gcl-2.5.3/makefile
--- gcl-2.5.3.orig/makefile Sun Mar 2 04:46:10 2003
+++ gcl-2.5.3/makefile Fri Oct 31 12:14:05 2003
@@ -126,7 +126,7 @@
install-command:
rm -f $(DESTDIR)$(prefix)/bin/gcl
(echo '#!/bin/sh' ; \
- if gcc --version | grep -q -i mingw ; then echo "export
C_INCLUDE_PATH=`echo $$INSTALL_LIB_DIR`/h"; else echo "export
C_INCLUDE_PATH=$(INSTALL_LIB_DIR)/h:\$$C_INCLUDE_PATH"; fi ;\
+ if gcc --version | grep -i mingw > /dev/null 2>&1 ; then echo "export
C_INCLUDE_PATH=`echo $$INSTALL_LIB_DIR`/h"; else echo "export
C_INCLUDE_PATH=$(INSTALL_LIB_DIR)/h:\$$C_INCLUDE_PATH"; fi ;\
echo exec $(BINDIR)/$(FLISP)$(EXE) \\ ; \
echo ' -dir' $(INSTALL_LIB_DIR)/unixport/ \\ ; \
echo ' -libdir' $(INSTALL_LIB_DIR)/ \\ ; \
@@ -137,7 +138,7 @@
echo '#' other options: -load "/tmp/foo.o" -load "jo.lsp" -eval '"(joe
3)"' >> $(DESTDIR)$(prefix)/bin/gcl
chmod a+x $(DESTDIR)$(prefix)/bin/gcl
rm -f $(DESTDIR)$(prefix)/bin/gclm.bat
- if gcc --version | grep -q mingw ; then (echo '@SET cd='; \
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then (echo '@SET
cd='; \
echo '@SET promp$=%prompt%'; \
echo '@PROMPT SET cd$Q$P'; \
echo '@CALL>%temp%.\setdir.bat'; \
@@ -152,7 +153,7 @@
echo 'path %cd%\..\mingw\bin;%PATH%'; \
echo "start %unixportdir%\saved_gcl.exe -dir %unixportdir% -libdir
%libdir% -eval \"(setq si::*allow-gzipped-file* t)\" %1 %2 %3 %4 %5 %6 %7 %8
%9" ) > $(DESTDIR)$(prefix)/bin/gclm.bat ; fi
rm -f $(DESTDIR)$(prefix)/bin/gclfinal.bat
- if gcc --version | grep -q -i mingw ; then (echo 'ECHO path
%1\mingw\bin;%PATH% > gcli.bat'; \
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then (echo 'ECHO
path %1\mingw\bin;%PATH% > gcli.bat'; \
echo "ECHO start %1\lib\gcl-2.5.0\unixport\saved_gcl.exe -dir
%1\lib\gcl-2.5.0\unixport -libdir %1\lib\gcl-2.5.0 -eval \"(setq
si::*allow-gzipped-file* t)\" %1 %2 %3 %4 %5 %6 %7 %8 %9 >> gcli.bat" ) >
$(DESTDIR)$(prefix)/bin/gclfinal.bat ; fi
install:
@@ -181,10 +182,10 @@
# echo '(load "../tkl.o")(TK::GET-AUTOLOADS (directory "*.lisp"))' |
../../$(PORTDIR)/$(FLISP)$(EXE)) ; fi
if test "$(EMACS_SITE_LISP)" != "" ; then (cd elisp ; $(MAKE) install
DESTDIR=$(DESTDIR)) ; fi
if test "$(INFO_DIR)" != "unknown"; then (cd info ; $(MAKE) ; $(MAKE)
install DESTDIR=$(DESTDIR)) ; fi
- if gcc --version | grep -q -i mingw ; then cp COPYING.LIB-2.0
readme-bin.mingw $(prefix) ; fi
- if gcc --version | grep -q -i mingw ; then cp gcl.ico $(prefix)/bin ; fi
- if gcc --version | grep -q -i mingw ; then rm -rf $(prefix)/install;
mkdir $(prefix)/install ; cp windows/install.lsp $(prefix)/install ;fi
- if gcc --version | grep -q -i mingw ; then rm -rf $(prefix)/doc; mkdir
$(prefix)/doc; cp info/*.html $(prefix)/doc ; fi
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then cp
COPYING.LIB-2.0 readme-bin.mingw $(prefix) ; fi
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then cp gcl.ico
$(prefix)/bin ; fi
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then rm -rf
$(prefix)/install; mkdir $(prefix)/install ; cp windows/install.lsp
$(prefix)/install ;fi
+ if gcc --version | grep -i mingw > /dev/null 1>&2 ; then rm -rf
$(prefix)/doc; mkdir $(prefix)/doc; cp info/*.html $(prefix)/doc ; fi
clean:
(cd $(BINDIR); $(MAKE) clean)
diff -u -r -N gcl-2.5.3.orig/unixport/makefile gcl-2.5.3/unixport/makefile
--- gcl-2.5.3.orig/unixport/makefile Thu Mar 20 16:22:55 2003
+++ gcl-2.5.3/unixport/makefile Fri Oct 31 12:14:05 2003
@@ -36,7 +36,7 @@
done
touch $@
-OBJS:=$(shell j=$$(ar t $(ODIR)/gcllib.a) ; for i in $$(ls -1 $(ODIR)/*.o) ;
do if ! echo $$j |grep -q $$(basename $$i) ; then echo $$i ; fi ; done)
+OBJS:=$(shell j=$$(ar t $(ODIR)/gcllib.a) ; for i in $$(ls -1 $(ODIR)/*.o) ;
do if ! echo $$j |grep $$(basename $$i) > /dev/null 2>&1 ; then echo $$i ; fi ;
done)
OBJS:=$(OBJS) $(shell ls -1 $(LSPDIR)/*.o)
OBJS:=$(OBJS) $(shell ls -1 $(CMPDIR)/*.o | grep -v collectfn.o)
diff -u -r -N gcl-2.5.3.orig/makefile gcl-2.5.3/makefile
--- gcl-2.5.3.orig/makefile Fri Oct 31 12:17:06 2003
+++ gcl-2.5.3/makefile Fri Oct 31 12:16:50 2003
@@ -126,7 +126,8 @@
install-command:
rm -f $(DESTDIR)$(prefix)/bin/gcl
(echo '#!/bin/sh' ; \
- if gcc --version | grep -i mingw > /dev/null 2>&1 ; then echo "export
C_INCLUDE_PATH=`echo $$INSTALL_LIB_DIR`/h"; else echo "export
C_INCLUDE_PATH=$(INSTALL_LIB_DIR)/h:\$$C_INCLUDE_PATH"; fi ;\
+ if gcc --version | grep -i mingw > /dev/null 2>&1 ; then echo
"C_INCLUDE_PATH=`echo $$INSTALL_LIB_DIR`/h"; else echo
"C_INCLUDE_PATH=$(INSTALL_LIB_DIR)/h:\$$C_INCLUDE_PATH"; fi ;\
+ echo 'export C_INCLUDE_PATH' ; \
echo exec $(BINDIR)/$(FLISP)$(EXE) \\ ; \
echo ' -dir' $(INSTALL_LIB_DIR)/unixport/ \\ ; \
echo ' -libdir' $(INSTALL_LIB_DIR)/ \\ ; \
- [Gcl-devel] two small patches for Solaris,
MAISONOBE Luc <=