diff -ur cl75/contrib/Makefile cl75-patched/contrib/Makefile --- cl75/contrib/Makefile Sun Nov 12 00:57:42 2000 +++ cl75-patched/contrib/Makefile Mon Aug 23 13:35:29 2004 @@ -4,8 +4,8 @@ # See the file INDEX for a description of the packages and their requirements. # Remember that "libunix" is required for # "debugger", "libgraph", "camltk", "camltk4", and "search_isos". -PACKAGES=libunix libgraph debugger libnum libstr mletags \ - camlmode lorder profiler camltk4 camlsearch +PACKAGES=libunix debugger libnum libstr mletags \ + camlmode lorder profiler camlsearch # caml-tex # caml-latex2e # camltk diff -ur cl75/contrib/libgraph/Makefile cl75-patched/contrib/libgraph/Makefile --- cl75/contrib/libgraph/Makefile Wed Dec 23 20:06:55 1998 +++ cl75-patched/contrib/libgraph/Makefile Mon Aug 23 13:35:29 2004 @@ -58,7 +58,7 @@ graphics.ml: graphics.mlp @rm -f graphics.ml - $(CPP) -Dunix graphics.mlp > graphics.ml + $(CPP) -Dunix graphics.mlp | sed -n '/^#pragma/!p' > graphics.ml @chmod -w graphics.ml depend: $(GENFILES) diff -ur cl75/src/Makefile cl75-patched/src/Makefile --- cl75/src/Makefile Wed Mar 3 14:25:57 1999 +++ cl75-patched/src/Makefile Mon Aug 23 13:35:29 2004 @@ -9,7 +9,7 @@ # This option circumvents a gcc bug on some platforms (680x0, 80386). # If you are using Linux with libc6 (RedHat 5, Debian 2), add -D__FAVOR_BSD # This option avoids signal-related problems. -OPTS=-fno-defer-pop -D__FAVOR_BSD +OPTS=-fno-defer-pop -D__FAVOR_BSD -no-cpp-precomp # Extra libraries that have to be linked with the runtime system. # The math library "-lm" is linked by default. @@ -26,7 +26,7 @@ # not all Unix C preprocessors define it. # If your cpp is too fussy, make tools/clprepro and use this: # CPP=../../src/tools/clprepro -Dunix -CPP=/lib/cpp -P -traditional -Dunix +CPP=/usr/bin/cpp -P -traditional -Dunix # The directory where public executables will be installed BINDIR=/usr/local/bin @@ -34,6 +34,10 @@ # The directory where the Caml Light standard library will be installed LIBDIR=/usr/local/lib/caml-light +# The directory from where Caml Light will run +# (useful for Debian packaging : the binary is not in fact installed in BINDIR) +RUNDIR=$(BINDIR) + # The manual section where the manual pages will be installed MANEXT=1 @@ -65,7 +69,7 @@ cd librar; make CPP="$(CPP)" all cd lex; make CPP="$(CPP)" all cd toplevel; make CPP="$(CPP)" all - cd launch; make LIBDIR=$(LIBDIR) BINDIR=$(BINDIR) \ + cd launch; make LIBDIR=$(LIBDIR) BINDIR=$(BINDIR) RUNDIR=$(RUNDIR) \ CC="$(CC)" OPTS="$(OPTS)" LIBS="$(LIBS)" all @ echo "Let's test quickly the toplevel system..." (echo "1+2;;"; \ @@ -123,7 +127,7 @@ if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi if test -d $(LIBDIR); then : ; else mkdir $(LIBDIR); fi cd runtime; make BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) install - cd launch; make BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) install + cd launch; make BINDIR=$(BINDIR) RUNDIR=$(RUNDIR) LIBDIR=$(LIBDIR) install cd lib; make BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) install cd compiler; make BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) install cd linker; make BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) install diff -ur cl75/src/compiler/Makefile cl75-patched/src/compiler/Makefile --- cl75/src/compiler/Makefile Wed Nov 12 17:48:14 1997 +++ cl75-patched/src/compiler/Makefile Mon Aug 23 13:45:53 2004 @@ -4,7 +4,7 @@ CAMLLINK=../camlrun ../camllink -stdlib ../lib CAMLLEX=../camlrun ../camllex CAMLYACC=../camlyacc -s -CPP=/lib/cpp -P -Dunix +CPP=/usr/bin/cpp -P -traditional -Dunix COMPFLAGS=-W -O fast LINKFLAGS=-g @@ -39,7 +39,7 @@ awk -f ../tools/make-opcodes > opcodes.ml lexer.mll: lexer.mlp - $(CPP) lexer.mlp > lexer.mll + $(CPP) lexer.mlp | sed -n '/^#pragma/!p' > lexer.mll lexer.ml: lexer.mll $(CAMLLEX) lexer.mll @@ -58,7 +58,7 @@ .mlp.ml: @rm -f $@ - $(CPP) $< > $@ + $(CPP) $< | sed -n '/^#pragma/!p' > $@ @chmod a-w $@ depend: $(GENSOURCES) diff -ur cl75/src/launch/Makefile cl75-patched/src/launch/Makefile --- cl75/src/launch/Makefile Wed Feb 22 10:33:26 1995 +++ cl75-patched/src/launch/Makefile Mon Aug 23 13:35:29 2004 @@ -11,7 +11,7 @@ # have write permission in the current directory if NFS-mounted... install: - (echo "#!$(BINDIR)/camlrun"; \ + (echo "#!$(RUNDIR)/camlrun"; \ echo "exit 2"; \ cat testprog) > /tmp/testscr chmod a+x /tmp/testscr diff -ur cl75/src/lib/Makefile cl75-patched/src/lib/Makefile --- cl75/src/lib/Makefile Wed Nov 12 17:49:46 1997 +++ cl75-patched/src/lib/Makefile Mon Aug 23 13:40:44 2004 @@ -2,7 +2,7 @@ CAMLCOMP=../camlrun ../camlcomp CAMLLIBR=../camlrun ../camllibr -CPP=/lib/cpp -P -Dunix +CPP=/usr/bin/cpp -P -traditional -Dunix COMPFLAGS=-stdlib . -O none -g -W # The list of all interfaces. Order irrelevant. @@ -43,7 +43,7 @@ $(CAMLCOMP) $(COMPFLAGS) $< .mlp.ml: @rm -f $@ - $(CPP) $< > $@ + $(CPP) $< | sed -n '/^#pragma/!p' > $@ @chmod a-w $@ depend: filename.ml genlex.ml diff -ur cl75/src/librar/Makefile cl75-patched/src/librar/Makefile --- cl75/src/librar/Makefile Wed Nov 12 17:50:13 1997 +++ cl75-patched/src/librar/Makefile Mon Aug 23 13:35:29 2004 @@ -37,7 +37,7 @@ .mlp.ml: @rm -f $@ - $(CPP) $< > $@ + $(CPP) $< | sed -n '/^#pragma/!p' > $@ @chmod a-w $@ depend: $(GENSOURCES) diff -ur cl75/src/linker/Makefile cl75-patched/src/linker/Makefile --- cl75/src/linker/Makefile Wed Nov 12 17:50:21 1997 +++ cl75-patched/src/linker/Makefile Mon Aug 23 13:47:38 2004 @@ -5,7 +5,7 @@ INCLUDES=-stdlib ../lib -I ../compiler COMPFLAGS=-W -O fast $(INCLUDES) LINKFLAGS=-g $(INCLUDES) -CPP=/lib/cpp -P -Dunix +CPP=/usr/bin/cpp -P -traditional -Dunix EXTERNOBJS=config.zo misc.zo interntl.zo opcodes.zo @@ -55,7 +55,7 @@ .mlp.ml: @rm -f $@ - $(CPP) $< > $@ + $(CPP) $< | sed -n '/^#pragma/!p' > $@ @chmod a-w $@ depend: $(GENSOURCES) diff -ur cl75/src/man/Makefile cl75-patched/src/man/Makefile --- cl75/src/man/Makefile Tue Nov 1 18:36:06 1994 +++ cl75-patched/src/man/Makefile Mon Aug 23 13:35:29 2004 @@ -3,4 +3,5 @@ MANDIR=/usr/man/man$(MANEXT) install: + mkdir -p $(MANDIR) for f in $(MAN); do cp $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done diff -ur cl75/src/runtime/io.c cl75-patched/src/runtime/io.c --- cl75/src/runtime/io.c Thu Apr 24 16:51:06 1997 +++ cl75-patched/src/runtime/io.c Mon Aug 23 13:35:29 2004 @@ -1,5 +1,9 @@ /* Buffered input/output. */ +#include "../../config/s.h" +#ifdef HAS_UNISTD +#include +#endif #include #ifdef __MWERKS__ #include "myfcntl.h" diff -ur cl75/src/runtime/main.c cl75-patched/src/runtime/main.c --- cl75/src/runtime/main.c Thu Apr 24 16:51:06 1997 +++ cl75-patched/src/runtime/main.c Mon Aug 23 13:35:29 2004 @@ -1,5 +1,9 @@ /* Start-up code */ +#include "../../config/s.h" +#ifdef HAS_UNISTD +#include +#endif #include #ifdef __MWERKS__ #include "myfcntl.h" diff -ur cl75/src/toplevel/Makefile cl75-patched/src/toplevel/Makefile --- cl75/src/toplevel/Makefile Wed Sep 13 18:37:06 2000 +++ cl75-patched/src/toplevel/Makefile Mon Aug 23 13:50:25 2004 @@ -7,7 +7,7 @@ INCLUDES=-stdlib ../lib -I ../compiler -I ../linker COMPFLAGS=-W -O fast $(INCLUDES) LINKFLAGS=-g $(INCLUDES) -CPP=/lib/cpp -P -Dunix +CPP=/usr/bin/cpp -P -traditional -Dunix CPPFLAGS= EXTERNOBJS=config.zo misc.zo interntl.zo \ @@ -75,7 +75,7 @@ .mlp.ml: @rm -f $@ - $(CPP) $(CPPFLAGS) $< > $@ + $(CPP) $(CPPFLAGS) $< | sed -n '/^#pragma/!p' > $@ @chmod a-w $@ depend: $(GENSOURCES)