mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
- Honor CC, CFLAGS etc. [1]
- Use BSD_INSTALL_* macros to install files. [1] - Make the port PREFIX clean. PR: ports/101398 [1] Submitted by: Stanislav Sedov <ssedov@mbsd.msk.ru>
This commit is contained in:
parent
27155d0b32
commit
02e454d15d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=169820
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= caml
|
||||
PORTVERSION= 0.75
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang elisp
|
||||
MASTER_SITES= ftp://ftp.inria.fr/lang/caml-light/ \
|
||||
ftp://sunsite.doc.ic.ac.uk/computing/programming/languages/ml/caml-light/ \
|
||||
@ -21,19 +22,18 @@ COMMENT= A strongly typed functional language belonging to the ML family
|
||||
USE_XLIB= yes
|
||||
WRKSRC= ${WRKDIR}/cl75
|
||||
ALL_TARGET= configure world bootstrap
|
||||
MAN1= camlc.1 camllex.1 camllibr.1 camllight.1 camlmktop.1 camlrun.1 camlyacc.1 mletags.1 camllorder.1 camlsearch.1
|
||||
MAN1= camlc.1 camllex.1 camllibr.1 camllight.1 camlmktop.1 \
|
||||
camlrun.1 camlyacc.1 mletags.1 camllorder.1 camlsearch.1
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/src; ${MAKE} ${ALL_TARGET} PREFIX=${PREFIX} \
|
||||
X11BASE=${X11BASE}
|
||||
cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET}
|
||||
|
||||
# build some contrib stuff too
|
||||
do-install:
|
||||
cd ${WRKSRC}/src; ${MAKE} ${INSTALL_TARGET} PREFIX=${PREFIX} \
|
||||
X11BASE=${X11BASE}
|
||||
cd ${WRKSRC}/contrib; ${MAKE} all ${INSTALL_TARGET} PREFIX=${PREFIX} \
|
||||
X11BASE=${X11BASE}
|
||||
cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET}
|
||||
cd ${WRKSRC}/contrib; ${SETENV} ${MAKE_ENV} ${MAKE} all \
|
||||
${INSTALL_TARGET}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,11 +1,28 @@
|
||||
--- src/Makefile.orig Wed Mar 3 18:55:57 1999
|
||||
+++ src/Makefile Sat Mar 6 19:51:31 2004
|
||||
--- src/Makefile.orig Wed Mar 3 16:25:57 1999
|
||||
+++ src/Makefile Sat Aug 5 09:56:37 2006
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
# Which C compiler to use.
|
||||
# Performance is often improved if you use gcc 2.x instead of cc.
|
||||
-CC=gcc
|
||||
+#CC=gcc
|
||||
|
||||
# Additional options to $(CC).
|
||||
# If you are using gcc, add -fno-defer-pop.
|
||||
# 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 ${CFLAGS}
|
||||
|
||||
# Extra libraries that have to be linked with the runtime system.
|
||||
# The math library "-lm" is linked by default.
|
||||
@@ -26,19 +26,19 @@
|
||||
# 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
|
||||
+CPP=/usr/bin/cpp -P -traditional -Dunix ${CPPFLAGS}
|
||||
|
||||
# The directory where public executables will be installed
|
||||
-BINDIR=/usr/local/bin
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- contrib/Makefile.orig Sat Nov 11 15:57:42 2000
|
||||
+++ contrib/Makefile Sat Mar 6 06:42:32 2004
|
||||
@@ -5,7 +5,7 @@
|
||||
--- contrib/Makefile.orig Sun Nov 12 02:57:42 2000
|
||||
+++ contrib/Makefile Sat Aug 5 09:57:42 2006
|
||||
@@ -5,24 +5,24 @@
|
||||
# Remember that "libunix" is required for
|
||||
# "debugger", "libgraph", "camltk", "camltk4", and "search_isos".
|
||||
PACKAGES=libunix libgraph debugger libnum libstr mletags \
|
||||
@ -9,7 +9,18 @@
|
||||
# caml-tex
|
||||
# caml-latex2e
|
||||
# camltk
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
# Which C compiler to use.
|
||||
# Should be the same compiler used to compile the main system (../src).
|
||||
-CC=gcc
|
||||
+#CC=gcc
|
||||
|
||||
# Any additional options to $(CC).
|
||||
-OPTS=
|
||||
+OPTS=${CFLAGS}
|
||||
|
||||
# How to call the C preprocessor on a file that does not have the .c extension.
|
||||
# That's /lib/cpp on most machines, sometimes /usr/bin/cpp,
|
||||
# and /usr/ccs/lib/cpp under Solaris.
|
||||
# The -P option suppresses the generation of "# linenum" directives,
|
||||
# which are not understood by Caml Light.
|
||||
|
@ -1,8 +1,9 @@
|
||||
--- src/man/Makefile-- Tue Nov 1 23:06:06 1994
|
||||
+++ src/man/Makefile Tue Jul 28 08:50:22 1998
|
||||
--- src/man/Makefile.orig Tue Nov 1 20:36:06 1994
|
||||
+++ src/man/Makefile Sat Aug 5 09:59:15 2006
|
||||
@@ -3,4 +3,5 @@
|
||||
MANDIR=/usr/man/man$(MANEXT)
|
||||
|
||||
install:
|
||||
- for f in $(MAN); do cp $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done
|
||||
+ mkdir -p ${MANDIR}
|
||||
for f in $(MAN); do cp $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done
|
||||
+ for f in $(MAN); do ${BSD_INSTALL_MAN} $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done
|
||||
|
@ -1,12 +1,13 @@
|
||||
--- contrib/camlmode/Makefile.orig Mon Dec 2 22:13:37 1996
|
||||
+++ contrib/camlmode/Makefile Thu Aug 20 08:11:56 1998
|
||||
--- contrib/camlmode/Makefile.orig Mon Dec 2 19:43:37 1996
|
||||
+++ contrib/camlmode/Makefile Sat Aug 5 10:00:05 2006
|
||||
@@ -11,8 +11,8 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
+ mkdir -p $(EMACSLISPDIR)
|
||||
cp $(FILES) $(EMACSLISPDIR)
|
||||
- cp $(FILES) $(EMACSLISPDIR)
|
||||
- dir=`pwd`; cd $(EMACSLISPDIR); $(EMACS) -batch -l $$dir/compile
|
||||
+ mkdir -p $(EMACSLISPDIR)
|
||||
+ ${BSD_INSTALL_DATA} $(FILES) $(EMACSLISPDIR)
|
||||
|
||||
clean:
|
||||
rm -f *~ #*#
|
||||
|
@ -1,7 +1,8 @@
|
||||
--- contrib/camlsearch/emacs-lisp/Makefile-- Sat Feb 4 23:42:23 1995
|
||||
+++ contrib/camlsearch/emacs-lisp/Makefile Tue Jul 28 08:49:53 1998
|
||||
--- contrib/camlsearch/emacs-lisp/Makefile.orig Sat Feb 4 21:12:23 1995
|
||||
+++ contrib/camlsearch/emacs-lisp/Makefile Sat Aug 5 10:00:54 2006
|
||||
@@ -1,3 +1,4 @@
|
||||
SOURCES=caml-search.el
|
||||
install: $(SOURCES)
|
||||
- cp $(SOURCES) $(ELISPDIR)
|
||||
+ mkdir -p $(ELISPDIR)
|
||||
cp $(SOURCES) $(ELISPDIR)
|
||||
+ ${BSD_INSTALL_DATA} $(SOURCES) $(ELISPDIR)
|
||||
|
15
lang/caml-light/files/patch-contrib_caml-tex_Makefile
Normal file
15
lang/caml-light/files/patch-contrib_caml-tex_Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
--- contrib/caml-tex/Makefile.orig Sat Aug 5 10:01:47 2006
|
||||
+++ contrib/caml-tex/Makefile Sat Aug 5 10:02:30 2006
|
||||
@@ -7,9 +7,9 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
- - cp caml-tex $(BINDIR)/caml-tex
|
||||
- - cp caml.sty caml-sl.sty $(TEXINPUTDIR)
|
||||
- - cp caml-tex.1 $(MANDIR)/caml-tex.$(MANEXT)
|
||||
+ - ${BSD_INSTALL_DATA} caml-tex $(BINDIR)/caml-tex
|
||||
+ - ${BSD_INSTALL_DATA} caml.sty caml-sl.sty $(TEXINPUTDIR)
|
||||
+ - ${BSD_INSTALL_MAN} caml-tex.1 $(MANDIR)/caml-tex.$(MANEXT)
|
||||
|
||||
caml-tex.doc: caml-tex.1
|
||||
nroff -man caml-tex.1 | sed -e 's/_//g' > caml-tex.doc
|
@ -0,0 +1,6 @@
|
||||
--- contrib/camlsearch/doc/Makefile-- Thu Dec 22 21:41:25 1994
|
||||
+++ contrib/camlsearch/doc/Makefile Sun Aug 6 14:01:43 2006
|
||||
@@ -1,2 +1,2 @@
|
||||
install:
|
||||
- cp camlsearch.l $(MANDIR)/camlsearch.$(MANEXT)
|
||||
+ ${BSD_INSTALL_MAN} camlsearch.l $(MANDIR)/camlsearch.$(MANEXT)
|
@ -0,0 +1,32 @@
|
||||
--- contrib/camlsearch/source/Makefile.orig Thu Dec 24 00:36:57 1998
|
||||
+++ contrib/camlsearch/source/Makefile Sun Aug 6 14:00:09 2006
|
||||
@@ -1,6 +1,6 @@
|
||||
-CAMLCOMP =camlc -c
|
||||
-CAMLLEX =camllex
|
||||
-CAMLYACC =camlyacc
|
||||
+CAMLCOMP =${PREFIX}/bin/camlc -c
|
||||
+CAMLLEX =${PREFIX}/bin/camllex
|
||||
+CAMLYACC =${PREFIX}/bin/camlyacc
|
||||
CAMLTEX =../tools/caml-tex-format
|
||||
CAMLDETEX =../tools/caml-tex-extract
|
||||
COMPFLAGS =-I $(UNIXLIBDIR) -I $(COMPLIBDIR) $(DEBUG) -W
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
# Crée l'executable
|
||||
$(NAME): $(OBJS)
|
||||
- camlc -custom -g $(LINKFLAGS) -o $(NAME) $(COMPOBJS) $(OBJS) $(UNIXLIBDIR)/libunix.a
|
||||
+ ${PREFIX}/bin/camlc -custom -g $(LINKFLAGS) -o $(NAME) $(COMPOBJS) $(OBJS) $(UNIXLIBDIR)/libunix.a
|
||||
|
||||
# Formate pour TeX
|
||||
report: $(TEXOBJ)
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
# Install CamlSearch
|
||||
install: $(NAME)
|
||||
- cp $(NAME) $(INSTALLDIR)
|
||||
- chmod 755 $(INSTALLDIR)/$(NAME)
|
||||
+ ${BSD_INSTALL_SCRIPT} $(NAME) $(INSTALLDIR)
|
||||
+
|
||||
# Efface les fichiers inutiles
|
||||
clean:
|
||||
rm -f $(NAME)
|
29
lang/caml-light/files/patch-contrib_debugger_Makefile
Normal file
29
lang/caml-light/files/patch-contrib_debugger_Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
--- ./contrib/debugger/Makefile-- Thu Dec 24 00:36:56 1998
|
||||
+++ ./contrib/debugger/Makefile Sun Aug 6 11:38:17 2006
|
||||
@@ -1,19 +1,19 @@
|
||||
# Makefile for the Caml Light debugger
|
||||
|
||||
# These options are overriden when called from ../Makefile
|
||||
-CC=cc
|
||||
+#CC=cc
|
||||
OPTS=
|
||||
-LIBDIR=/usr/local/lib/caml-light
|
||||
-CPP=/lib/cpp -P
|
||||
+LIBDIR=${PREFIX}/lib/caml-light
|
||||
+CPP=/usr/bin/cpp -P
|
||||
|
||||
# Compilation options
|
||||
-CAMLC=camlc
|
||||
-CAMLLEX=camllex
|
||||
-CAMLYACC=camlyacc
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
+CAMLLEX=${PREFIX}/bin/camllex
|
||||
+CAMLYACC=${PREFIX}/bin/camlyacc
|
||||
INCLUDES=-I ../libunix -I ../../src/compiler -I ../../src/linker -I ../../src/toplevel
|
||||
COMPFLAGS=-W $(INCLUDES)
|
||||
LINKFLAGS=$(INCLUDES)
|
||||
-CFLAGS=$(OPTS) -O -I../../src/runtime
|
||||
+CFLAGS+=$(OPTS) -I../../src/runtime
|
||||
|
||||
EXTERNOBJS = \
|
||||
config.zo globals.zo misc.zo interntl.zo \
|
38
lang/caml-light/files/patch-contrib_libgraph_Makefile
Normal file
38
lang/caml-light/files/patch-contrib_libgraph_Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
--- ./contrib/libgraph/Makefile-- Thu Dec 24 00:36:55 1998
|
||||
+++ ./contrib/libgraph/Makefile Sun Aug 6 11:37:59 2006
|
||||
@@ -1,17 +1,17 @@
|
||||
# Makefile for the portable graphics library
|
||||
|
||||
# These options are overriden when called from ../Makefile
|
||||
-CC=cc
|
||||
+#CC=cc
|
||||
OPTS=
|
||||
-X11_INCLUDES=/usr/include
|
||||
-X11_LIB=/usr/lib
|
||||
-CPP=/lib/cpp -P
|
||||
+X11_INCLUDES=${X11BASE}
|
||||
+X11_LIB=${X11BASE}/lib
|
||||
+CPP=/usr/bin/cpp -P
|
||||
|
||||
-BINDIR=/usr/local/bin
|
||||
-LIBDIR=/usr/local/lib/caml-light
|
||||
+BINDIR=${PREFIX}/bin
|
||||
+LIBDIR=${PREFIX}/lib/caml-light
|
||||
|
||||
# Compilation options
|
||||
-CFLAGS=$(OPTS) -I../../src/runtime -I$(X11_INCLUDES) -O
|
||||
+CFLAGS+=$(OPTS) -I../../src/runtime -I$(X11_INCLUDES)
|
||||
|
||||
# Test to see whether ranlib exists on the machine
|
||||
RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib
|
||||
@@ -20,8 +20,8 @@
|
||||
RANLIB=ranlib
|
||||
|
||||
# The Caml Light compilers
|
||||
-CAMLC=camlc
|
||||
-CAMLMKTOP=camlmktop
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
+CAMLMKTOP=${PREFIX}/bin/camlmktop
|
||||
COMPFLAGS=-W -I ../libunix
|
||||
|
||||
OBJS=open.o draw.o fill.o color.o text.o \
|
34
lang/caml-light/files/patch-contrib_libnum_Makefile
Normal file
34
lang/caml-light/files/patch-contrib_libnum_Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
--- ./contrib/libnum/Makefile-- Thu Dec 24 00:36:56 1998
|
||||
+++ ./contrib/libnum/Makefile Sun Aug 6 11:40:07 2006
|
||||
@@ -12,12 +12,12 @@
|
||||
RANLIB=ranlib
|
||||
|
||||
# Compilation options
|
||||
-CFLAGS=-O -I../../src/runtime -I./bignum/h
|
||||
-CAMLC=camlc
|
||||
+CFLAGS+=-I../../src/runtime -I./bignum/h
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c
|
||||
COMPFLAGS=-W #-O fast
|
||||
-CAMLLIBR=camllibr
|
||||
-CAMLMKTOP=camlmktop
|
||||
+CAMLLIBR=${PREFIX}/bin/camllibr
|
||||
+CAMLMKTOP=${PREFIX}/bin/camlmktop
|
||||
|
||||
ZOFILES=int_misc.zo fnat.zo nat.zo big_int.zo arith_flags.zo ratio.zo \
|
||||
num.zo arith_status.zo
|
||||
@@ -43,10 +43,10 @@
|
||||
cd bignum; make $(BIGNUM_ARCH) CC="$(CC)"
|
||||
|
||||
install:
|
||||
- cp libnums.a $(LIBDIR)/libnums.a
|
||||
- if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libnums.a; else true; fi
|
||||
- cp nums.zo $(ZIFILES) $(LIBDIR)
|
||||
- cp camlnum $(LIBDIR)
|
||||
+ ${BSD_INSTALL_DATA} libnums.a $(LIBDIR)
|
||||
+ if $(RANLIBTEST); then (cd $(LIBDIR); $(RANLIB) libnums.a); else true; fi
|
||||
+ ${BSD_INSTALL_DATA} nums.zo $(ZIFILES) $(LIBDIR)
|
||||
+ ${BSD_INSTALL_SCRIPT} camlnum $(LIBDIR)
|
||||
|
||||
clean:
|
||||
rm -f libnums.a *.o *.z[io] camlnum
|
20
lang/caml-light/files/patch-contrib_libnum_bignum_Makefile
Normal file
20
lang/caml-light/files/patch-contrib_libnum_bignum_Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
--- contrib/libnum/bignum/Makefile.orig Sat Aug 5 10:03:23 2006
|
||||
+++ contrib/libnum/bignum/Makefile Sat Aug 5 10:05:03 2006
|
||||
@@ -4,7 +4,7 @@
|
||||
# modified_on Thu Nov 2 14:23:14 GMT+1:00 1989 by gangnet
|
||||
# modified_on Wed Jul 5 10:23:54 GMT+2:00 1989 by bertin
|
||||
|
||||
-CC = cc
|
||||
+#CC = cc
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib
|
||||
@@ -327,7 +327,7 @@
|
||||
rm -f bignum.00.shar
|
||||
$(SENDMAIL) $(SENDMAILFLAGS) $(USER) <tosend
|
||||
for i in `ls bignum.[0-9][0-9].shar`; \
|
||||
- do cp sendmail_header tosend; \
|
||||
+ do ${BSD_INSTALL_DATA} sendmail_header tosend; \
|
||||
echo $$i | sed -e "s/^bignum0*/Subject: BigNum - Part /" >>tosend; \
|
||||
echo "# Remove all text above and including this line." >>tosend; \
|
||||
sed -e "s/modified_on/modified_on/g" <$$i >>tosend; \
|
49
lang/caml-light/files/patch-contrib_libstr_Makefile
Normal file
49
lang/caml-light/files/patch-contrib_libstr_Makefile
Normal file
@ -0,0 +1,49 @@
|
||||
--- contrib/libstr/Makefile.orig Thu Dec 24 00:36:56 1998
|
||||
+++ contrib/libstr/Makefile Sun Aug 6 15:25:09 2006
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for the strings library
|
||||
|
||||
# These options are overriden when called from ../Makefile
|
||||
-CC=cc
|
||||
+#CC=cc
|
||||
OPTS=
|
||||
|
||||
# Test to see whether ranlib exists on the machine
|
||||
@@ -11,8 +11,8 @@
|
||||
RANLIB=ranlib
|
||||
|
||||
# Compilation options
|
||||
-CFLAGS=-O -I$(REGEXLIB) -I../../src/runtime
|
||||
-CAMLC=camlc
|
||||
+CFLAGS=-I$(REGEXLIB) -I../../src/runtime
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c
|
||||
COMPFLAGS=-W
|
||||
REGEXLIB=regex-0.12
|
||||
@@ -26,10 +26,10 @@
|
||||
if test -f /bin/ranlib -o -f /usr/bin/ranlib; then ranlib libstr.a; fi
|
||||
|
||||
camlstr: libstr.a str.zo
|
||||
- camlmktop -o camlstr -custom str.zo libstr.a
|
||||
+ ${PREFIX}/bin/camlmktop -o camlstr -custom str.zo libstr.a
|
||||
|
||||
$(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
|
||||
- cd $(REGEXLIB); CC="$(CC)" sh configure; make
|
||||
+ cd $(REGEXLIB); CC="$(CC) $(CFLAGS)" sh configure; make
|
||||
|
||||
clean:
|
||||
rm -f libstr.a *.o *.zo *.zi camlstr
|
||||
@@ -37,10 +37,10 @@
|
||||
cd $(REGEXLIB); if test -f Makefile; then make distclean; else exit 0; fi
|
||||
|
||||
install:
|
||||
- cp libstr.a $(LIBDIR)/libstr.a
|
||||
+ ${BSD_INSTALL_DATA} libstr.a $(LIBDIR)
|
||||
if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libstr.a; else true; fi
|
||||
- cp str.zo str.zi $(LIBDIR)
|
||||
- cp camlstr $(LIBDIR)
|
||||
+ ${BSD_INSTALL_DATA} str.zo str.zi $(LIBDIR)
|
||||
+ ${BSD_INSTALL_SCRIPT} camlstr $(LIBDIR)
|
||||
|
||||
.SUFFIXES: .ml .mli .zo .zi .tex
|
||||
|
19
lang/caml-light/files/patch-contrib_libstr_regex_Makefile.in
Normal file
19
lang/caml-light/files/patch-contrib_libstr_regex_Makefile.in
Normal file
@ -0,0 +1,19 @@
|
||||
--- contrib/libstr/regex-0.12/Makefile.in-- Mon Nov 14 22:09:41 1994
|
||||
+++ contrib/libstr/regex-0.12/Makefile.in Sun Aug 6 15:38:53 2006
|
||||
@@ -26,13 +26,13 @@
|
||||
# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
|
||||
# the corresponding C procedures). If not -DDEBUG, the macros
|
||||
# are used.
|
||||
-CPPFLAGS =
|
||||
+CPPFLAGS ?=
|
||||
|
||||
# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
|
||||
-CFLAGS = -O
|
||||
+CFLAGS ?= -O
|
||||
|
||||
# Ditto for LDFLAGS and LOADLIBES.
|
||||
-LDFLAGS =
|
||||
+LDFLAGS ?=
|
||||
LOADLIBES =
|
||||
|
||||
srcdir = @srcdir@
|
40
lang/caml-light/files/patch-contrib_libunix_Makefile
Normal file
40
lang/caml-light/files/patch-contrib_libunix_Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
--- ./contrib/libunix/Makefile-- Thu Dec 24 00:36:54 1998
|
||||
+++ ./contrib/libunix/Makefile Sun Aug 6 11:42:16 2006
|
||||
@@ -3,7 +3,7 @@
|
||||
# These options are overriden when called from ../Makefile
|
||||
CC=cc
|
||||
OPTS=
|
||||
-LIBDIR=/usr/local/lib/caml-light
|
||||
+LIBDIR=${PREFIX}/lib/caml-light
|
||||
|
||||
# Test to see whether ranlib exists on the machine
|
||||
RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib
|
||||
@@ -12,11 +12,11 @@
|
||||
RANLIB=ranlib
|
||||
|
||||
# Compilation options
|
||||
-CFLAGS=-I../../src/runtime -O $(OPTS)
|
||||
-CAMLC=camlc
|
||||
+CFLAGS+=-I../../src/runtime $(OPTS)
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c
|
||||
COMPFLAGS=-W
|
||||
-CAMLMKTOP=camlmktop
|
||||
+CAMLMKTOP=${PREFIX}/bin/camlmktop
|
||||
|
||||
OBJS=accept.o access.o addrofstr.o alarm.o bind.o chdir.o chmod.o \
|
||||
chown.o chroot.o close.o closedir.o connect.o cst2constr.o cstringv.o \
|
||||
@@ -51,10 +51,10 @@
|
||||
rm -f libunix.a *.o *.zi *.zo lint-blurb camlunix
|
||||
|
||||
install:
|
||||
- cp libunix.a $(LIBDIR)/libunix.a
|
||||
+ ${BSD_INSTALL_DATA} libunix.a $(LIBDIR)
|
||||
if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libunix.a; else true; fi
|
||||
- cp $(INTF) $(IMPL) $(LIBDIR)
|
||||
- cp camlunix $(LIBDIR)
|
||||
+ ${BSD_INSTALL_DATA} $(INTF) $(IMPL) $(LIBDIR)
|
||||
+ ${BSD_INSTALL_SCRIPT} camlunix $(LIBDIR)
|
||||
|
||||
.SUFFIXES: .ml .mli .zo .zi
|
||||
|
36
lang/caml-light/files/patch-contrib_lorder_Makefile
Normal file
36
lang/caml-light/files/patch-contrib_lorder_Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
--- contrib/lorder/Makefile.orig Thu Dec 24 00:36:56 1998
|
||||
+++ contrib/lorder/Makefile Sun Aug 6 12:14:52 2006
|
||||
@@ -1,9 +1,9 @@
|
||||
-MANDIR=/usr/man/man1
|
||||
-BINDIR=/usr/local/bin
|
||||
+MANDIR=${PREFIX}/man/man1
|
||||
+BINDIR=${PREFIX}/bin
|
||||
|
||||
-CPP=/lib/cpp -P -Dunix
|
||||
+CPP=/usr/bin/cpp -P -Dunix
|
||||
|
||||
-CAMLC=camlc
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c
|
||||
COMPFLAGS=-g -W -I ../../src/compiler
|
||||
LINKFLAGS=-g -I ../../src/compiler
|
||||
@@ -15,7 +15,7 @@
|
||||
all: camllorder
|
||||
|
||||
camllorder: $(OBJS)
|
||||
- camlc $(LINKFLAGS) -o camllorder $(COMPILEROBJS) $(OBJS)
|
||||
+ ${CAMLC} $(LINKFLAGS) -o camllorder $(COMPILEROBJS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.z[oi] camllorder Makefile.bak
|
||||
@@ -26,8 +26,8 @@
|
||||
rm -f camllorder.tar.Z
|
||||
|
||||
install:
|
||||
- cp camllorder $(BINDIR)
|
||||
- cp camllorder.1 $(MANDIR)
|
||||
+ ${BSD_INSTALL_SCRIPT} camllorder $(BINDIR)
|
||||
+ ${BSD_INSTALL_MAN} camllorder.1 $(MANDIR)
|
||||
|
||||
|
||||
.SUFFIXES :
|
36
lang/caml-light/files/patch-contrib_mletags_Makefile
Normal file
36
lang/caml-light/files/patch-contrib_mletags_Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
--- contrib/mletags/Makefile.orig Thu Dec 24 00:36:56 1998
|
||||
+++ contrib/mletags/Makefile Sun Aug 6 12:13:31 2006
|
||||
@@ -1,9 +1,9 @@
|
||||
# Configuration
|
||||
-CPP=/lib/cpp -P
|
||||
-CAMLC=camlc
|
||||
+CPP=/usr/bin/cpp -P
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c -g
|
||||
-CAMLLEX=camllex
|
||||
-CAMLYACC=camlyacc
|
||||
+CAMLLEX=${PREFIX}/bin/camllex
|
||||
+CAMLYACC=${PREFIX}/bin/camlyacc
|
||||
|
||||
COMPFLAGS=-W -O fast
|
||||
LINKFLAGS=-g
|
||||
@@ -14,7 +14,7 @@
|
||||
all: mletags
|
||||
|
||||
mletags: $(OBJS)
|
||||
- camlc -o mletags $(LINKFLAGS) $(OBJS)
|
||||
+ $(CAMLC) -o mletags $(LINKFLAGS) $(OBJS)
|
||||
|
||||
lexer.mll: lexer.mlp
|
||||
$(CPP) -Dunix lexer.mlp > lexer.mll
|
||||
@@ -37,8 +37,8 @@
|
||||
compress mletags.tar
|
||||
|
||||
install: mletags mletags.man
|
||||
- cp mletags $(BINDIR)
|
||||
- cp mletags.man $(MANDIR)/mletags.$(MANEXT)
|
||||
+ ${BSD_INSTALL_SCRIPT} mletags $(BINDIR)
|
||||
+ ${BSD_INSTALL_MAN} mletags.man $(MANDIR)/mletags.$(MANEXT)
|
||||
|
||||
TAGS:
|
||||
./mletags *.ml *.mli
|
56
lang/caml-light/files/patch-contrib_profiler_Makefile
Normal file
56
lang/caml-light/files/patch-contrib_profiler_Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
--- contrib/profiler/Makefile.orig Thu Dec 24 00:36:56 1998
|
||||
+++ contrib/profiler/Makefile Sun Aug 6 13:57:37 2006
|
||||
@@ -1,9 +1,9 @@
|
||||
-CPP=/lib/cpp -P
|
||||
+CPP=/usr/bin/cpp -P
|
||||
|
||||
-CAMLC=camlc
|
||||
+CAMLC=${PREFIX}/bin/camlc
|
||||
CAMLCOMP=$(CAMLC) -c
|
||||
-CAMLLEX=camllex
|
||||
-CAMLYACC=camlyacc
|
||||
+CAMLLEX=${PREFIX}/bin/camllex
|
||||
+CAMLYACC=${PREFIX}/bin/camlyacc
|
||||
|
||||
COMPFLAGS=-W -g -I ../../src/compiler
|
||||
LINKFLAGS=-g -I ../../src/compiler
|
||||
@@ -27,7 +27,7 @@
|
||||
all: camlpro stdlibp.zo prodump.zo
|
||||
|
||||
camlpro: $(OBJS)
|
||||
- camlc $(LINKFLAGS) -o camlpro $(COMPILEROBJS) $(OBJS)
|
||||
+ ${CAMLC} $(LINKFLAGS) -o camlpro $(COMPILEROBJS) $(OBJS)
|
||||
|
||||
camlpro.ml: camlpro.mlp
|
||||
@rm -f camlpro.ml
|
||||
@@ -35,22 +35,22 @@
|
||||
@chmod -w camlpro.ml
|
||||
|
||||
prodump.zo: prodump.ml
|
||||
- camlc -c -O none prodump.ml
|
||||
+ ${CAMLC} -c -O none prodump.ml
|
||||
|
||||
stdlibp.zo: profiler.ml profiler.mli io.ml
|
||||
- camlc -c -O none profiler.mli
|
||||
- camlc -c -O none profiler.ml
|
||||
+ ${CAMLC} -c -O none profiler.mli
|
||||
+ ${CAMLC} -c -O none profiler.ml
|
||||
/bin/rm -f io.mli
|
||||
-ln -s ../../src/lib/io.mli ./io.mli
|
||||
- camlc -c -O none io.mli
|
||||
- camlc -c -O none io.ml
|
||||
- camllibr -stdlib ../../src/lib -o stdlibp.zo $(PRO_IMPL)
|
||||
+ ${CAMLC} -c -O none io.mli
|
||||
+ ${CAMLC} -c -O none io.ml
|
||||
+ ${PREFIX}/bin/camllibr -stdlib ../../src/lib -o stdlibp.zo $(PRO_IMPL)
|
||||
|
||||
install:
|
||||
- cp camlpro $(LIBDIR)/camlinstr
|
||||
+ ${BSD_INSTALL_SCRIPT} camlpro $(LIBDIR)/camlinstr
|
||||
rm -f $(BINDIR)/camlpro
|
||||
ln -s $(LIBDIR)/camlinstr $(BINDIR)/camlpro
|
||||
- cp stdlibp.zo prodump.zo profiler.zi $(LIBDIR)
|
||||
+ ${BSD_INSTALL_DATA} stdlibp.zo prodump.zo profiler.zi $(LIBDIR)
|
||||
|
||||
clean:
|
||||
rm -f *.z[oi] camlinstr camlpro io.mli camlpro.ml
|
23
lang/caml-light/files/patch-src_launch_Makefile
Normal file
23
lang/caml-light/files/patch-src_launch_Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
--- src/launch/Makefile.orig Wed Feb 22 15:03:26 1995
|
||||
+++ src/launch/Makefile Sun Aug 6 11:58:56 2006
|
||||
@@ -17,16 +17,17 @@
|
||||
chmod a+x /tmp/testscr
|
||||
sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
|
||||
then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \
|
||||
- else cp camlexec $(LIBDIR)/header; \
|
||||
+ else ${BSD_INSTALL_SCRIPT} camlexec $(LIBDIR)/header; \
|
||||
fi'
|
||||
rm -f /tmp/testscr
|
||||
for script in camlc camllight camlmktop; do \
|
||||
- cp $$script $(BINDIR)/$$script; \
|
||||
+ ${BSD_INSTALL_SCRIPT} $$script $(BINDIR)/$$script; \
|
||||
chmod a+x $(BINDIR)/$$script; \
|
||||
done
|
||||
|
||||
SEDCOMMANDS=\
|
||||
- -e 's|LIBDIR|$(LIBDIR)|' -e 's|CC|$(CC) $(OPTS)|' -e 's|LIBS|$(LIBS)|'
|
||||
+ -e 's|LIBDIR|$(LIBDIR)|' -e 's|CC|$(CC) $(OPTS)|' -e 's|LIBS|$(LIBS)|' \
|
||||
+ -e 's|BINDIR|$(BINDIR)|'
|
||||
|
||||
camlc: camlc.tpl ../version.h
|
||||
sed $(SEDCOMMANDS) \
|
49
lang/caml-light/files/patch-src_launch_camlc.tpl
Normal file
49
lang/caml-light/files/patch-src_launch_camlc.tpl
Normal file
@ -0,0 +1,49 @@
|
||||
--- src/launch/camlc.tpl-- Sun Aug 6 12:07:15 2006
|
||||
+++ src/launch/camlc.tpl Sun Aug 6 12:00:03 2006
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
+camlrun=BINDIR/camlrun
|
||||
stdlib=LIBDIR
|
||||
linkalso=true
|
||||
includes=""
|
||||
@@ -30,14 +31,14 @@
|
||||
if $profile
|
||||
then
|
||||
$stdlib/camlinstr -m $proflags -stdlib $stdlib $includes $compopt $1 ${1}t || { rc=$?; rm -f ${1}t; exit $rc; }
|
||||
- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt ${1}t || { rc=$?; rm -f ${1}t; exit $rc; }
|
||||
+ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt ${1}t || { rc=$?; rm -f ${1}t; exit $rc; }
|
||||
rm -f ${1}t
|
||||
else
|
||||
- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $?
|
||||
+ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $?
|
||||
fi
|
||||
linkfiles="$linkfiles $1";;
|
||||
*.mli)
|
||||
- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $?
|
||||
+ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $?
|
||||
;;
|
||||
*.zo)
|
||||
linkfiles="$linkfiles $1";;
|
||||
@@ -63,9 +64,9 @@
|
||||
-v|-version)
|
||||
echo "The Caml Light system, version" VERSION
|
||||
echo " (standard library from $stdlib)"
|
||||
- camlrun -V
|
||||
- camlrun $stdlib/camlcomp -version
|
||||
- camlrun $stdlib/camllink -version;;
|
||||
+ $camlrun -V
|
||||
+ $camlrun $stdlib/camlcomp -version
|
||||
+ $camlrun $stdlib/camllink -version;;
|
||||
-files)
|
||||
linkfiles="$linkfiles $1 $2"
|
||||
shift;;
|
||||
@@ -106,7 +107,7 @@
|
||||
done
|
||||
|
||||
if $linkalso && test -n "$linkfiles"; then
|
||||
- camlrun $stdlib/camllink -stdlib $stdlib $includes $custom $linkopt \
|
||||
+ $camlrun $stdlib/camllink -stdlib $stdlib $includes $custom $linkopt \
|
||||
-exec $linkout $stdlib/stdlib$p.zo $linkfiles $prodump || exit $?
|
||||
if test -n "$custom"; then
|
||||
if mv $linkout /tmp/camlcode.$$ \
|
19
lang/caml-light/files/patch-src_launch_camllight.tpl
Normal file
19
lang/caml-light/files/patch-src_launch_camllight.tpl
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/launch/camllight.tpl-- Fri Jun 23 22:28:07 1995
|
||||
+++ src/launch/camllight.tpl Sun Aug 6 12:00:50 2006
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
stdlib=LIBDIR
|
||||
+camlrun=BINDIR/camlrun
|
||||
includes=""
|
||||
options=""
|
||||
|
||||
@@ -12,7 +13,7 @@
|
||||
while : ; do
|
||||
case $1 in
|
||||
"")
|
||||
- exec camlrun $stdlib/camltop -stdlib $stdlib $includes $options;;
|
||||
+ exec $camlrun $stdlib/camltop -stdlib $stdlib $includes $options;;
|
||||
-I|-include)
|
||||
includes="$includes -I $2"
|
||||
shift;;
|
24
lang/caml-light/files/patch-src_launch_camlmktop.tpl
Normal file
24
lang/caml-light/files/patch-src_launch_camlmktop.tpl
Normal file
@ -0,0 +1,24 @@
|
||||
--- src/launch/camlmktop.tpl-- Mon Feb 24 16:01:07 1997
|
||||
+++ src/launch/camlmktop.tpl Sun Aug 6 12:01:27 2006
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
+camlrun=BINDIR/camlrun
|
||||
stdlib=LIBDIR
|
||||
linkfiles=""
|
||||
custom=""
|
||||
@@ -58,11 +59,11 @@
|
||||
shift
|
||||
done
|
||||
|
||||
-camlrun $stdlib/provide -stdlib $stdlib $includes $perv > /tmp/camlreq.$$ \
|
||||
+$camlrun $stdlib/provide -stdlib $stdlib $includes $perv > /tmp/camlreq.$$ \
|
||||
|| exit $?
|
||||
-camlrun $stdlib/camllink -stdlib $stdlib $custom -require /tmp/camlreq.$$ \
|
||||
+$camlrun $stdlib/camllink -stdlib $stdlib $custom -require /tmp/camlreq.$$ \
|
||||
-exec /tmp/camlout.$$ -g $includes stdlib$p.zo toplib.zo $linkfiles topmain.zo || exit $?
|
||||
-camlrun $stdlib/expunge $debug /tmp/camlout.$$ $output sys $perv || exit $?
|
||||
+$camlrun $stdlib/expunge $debug /tmp/camlout.$$ $output sys $perv || exit $?
|
||||
rm -f /tmp/camlreq.$$ /tmp/camlout.$$
|
||||
if test -n "$custom"; then
|
||||
if mv $output /tmp/camlcode.$$ \
|
14
lang/caml-light/files/patch-src_runtime_Makefile
Normal file
14
lang/caml-light/files/patch-src_runtime_Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
--- src/runtime/Makefile.orig Tue Jun 10 17:54:35 1997
|
||||
+++ src/runtime/Makefile Sun Aug 6 15:20:36 2006
|
||||
@@ -1,9 +1,9 @@
|
||||
# Makefile for the Caml Light runtime system
|
||||
|
||||
# These options are overriden when called from ../Makefile.
|
||||
-CC=cc
|
||||
+#CC=cc
|
||||
OPTS=#-fno-defer-pop
|
||||
-CFLAGS=-O2 $(OPTS) -I..
|
||||
+CFLAGS=$(OPTS) -I..
|
||||
LIBS=
|
||||
|
||||
# Test to see whether ranlib exists on the machine
|
Loading…
Reference in New Issue
Block a user