]> git.pld-linux.org Git - packages/ocaml.git/blame - ocaml-CFLAGS.patch
- whitespace cleanup
[packages/ocaml.git] / ocaml-CFLAGS.patch
CommitLineData
9de25172 1# allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFLAGS)
04508f14 2Makefiles=$(find . -type f -name Makefile\*)
3%{__sed} -i -e 's@^CFLAGS[ \t]*=@override CFLAGS += @' $Makefiles
4%{__sed} -i -e 's@\(^override CFLAGS += .*\)-O \(.*\)@\1\2@' $Makefiles
5%{__sed} -i -e 's@^CCFLAGS[ \t]*=\(.*\)@override CCFLAGS += \1 $(CFLAGS)@' $Makefiles
6%{__sed} -i -e 's@-pg -O -DPROFILING@ $(CFLAGS) @' asmrun/Makefile
7%{__sed} -i -e 's@-O@$(CFLAGS)@' otherlibs/systhreads/Makefile
8
27676bd0
JB
9--- ocaml-4.02.2/asmrun/Makefile.orig 2015-06-28 13:45:16.203456490 +0200
10+++ ocaml-4.02.2/asmrun/Makefile 2015-06-28 15:07:59.556581531 +0200
11@@ -16,10 +16,10 @@
04508f14 12 CC=$(NATIVECC)
13 FLAGS=-I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE \
31cbf6d8 14 -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(IFLEXDIR)
27676bd0 15-CFLAGS=$(FLAGS) $(NATIVECCCOMPOPTS)
04508f14 16+override CFLAGS += $(FLAGS) $(NATIVECCCOMPOPTS)
17 DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS)
18-PFLAGS=$(FLAGS) -pg -O -DPROFILING $(NATIVECCPROFOPTS)
27676bd0
JB
19-PICFLAGS=$(FLAGS) -O $(SHAREDCCCOMPOPTS) $(NATIVECCCOMPOPTS)
20+PFLAGS=$(FLAGS) $(CFLAGS) $(NATIVECCPROFOPTS)
21+PICFLAGS=$(FLAGS) $(CFLAGS) $(SHAREDCCCOMPOPTS) $(NATIVECCCOMPOPTS)
04508f14 22
31cbf6d8 23 COBJS=startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o \
04508f14 24 misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o \
e091ab7c
JB
25--- ocaml-4.02.1/asmrun/Makefile.nt.orig 2014-11-06 21:32:19.358167666 +0100
26+++ ocaml-4.02.1/asmrun/Makefile.nt 2014-11-07 16:19:43.681995569 +0100
27@@ -14,7 +14,7 @@
04508f14 28 include ../config/Makefile
29
30 CC=$(NATIVECC)
e091ab7c
JB
31-CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \
32+override CFLAGS += -I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \
33 $(NATIVECCCOMPOPTS)
04508f14 34
e091ab7c 35 COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O)\
27676bd0
JB
36--- ocaml-4.02.2/byterun/Makefile.orig 2015-06-28 13:45:16.206789823 +0200
37+++ ocaml-4.02.2/byterun/Makefile 2015-06-28 15:08:35.076580040 +0200
38@@ -13,7 +13,7 @@
04508f14 39
31cbf6d8
JR
40 include Makefile.common
41
27676bd0 42-CFLAGS=-DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR)
31cbf6d8 43+override CFLAGS += -DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR)
9de25172 44 DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR)
04508f14 45
27676bd0 46 OBJS=$(COMMONOBJS) $(UNIX_OR_WIN32).o main.o
31cbf6d8
JR
47diff -ur ocaml-3.11.0/byterun/Makefile.nt ocaml-3.11.0.CFLAGS/byterun/Makefile.nt
48--- ocaml-3.11.0/byterun/Makefile.nt 2008-11-26 14:26:53.000000000 +0100
49+++ ocaml-3.11.0.CFLAGS/byterun/Makefile.nt 2009-02-16 12:18:01.215883365 +0100
50@@ -15,7 +15,7 @@
04508f14 51
31cbf6d8 52 include Makefile.common
04508f14 53
31cbf6d8
JR
54-CFLAGS=-DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR)
55+override CFLAGS += -DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR)
04508f14 56
31cbf6d8
JR
57 DBGO=d.$(O)
58 OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O)
27676bd0
JB
59--- ocaml-4.02.2/otherlibs/Makefile.orig 2015-06-28 13:45:16.210123156 +0200
60+++ ocaml-4.02.2/otherlibs/Makefile 2015-06-28 15:09:02.573245553 +0200
e091ab7c 61@@ -16,7 +16,7 @@
27676bd0
JB
62 CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib
63 CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \
e091ab7c 64 -I $(ROOTDIR)/stdlib
27676bd0
JB
65-CFLAGS=-I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
66+override CFLAGS += -I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
04508f14 67
31cbf6d8
JR
68 include ../Makefile.shared
69 # Note .. is the current directory (this makefile is included from
27676bd0
JB
70--- ocaml-4.02.2/otherlibs/systhreads/Makefile.orig 2015-06-28 13:45:16.213456489 +0200
71+++ ocaml-4.02.2/otherlibs/systhreads/Makefile 2015-06-28 15:09:59.356576505 +0200
72@@ -36,7 +36,7 @@
e091ab7c 73 $(MKLIB) -o threads $(BYTECODE_C_OBJS) $(PTHREAD_LINK)
04508f14 74
9de25172 75 st_stubs_b.o: st_stubs.c st_posix.h
27676bd0 76- $(BYTECC) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \
04508f14 77+ $(BYTECC) $(CFLAGS) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \
9de25172
JB
78 -c st_stubs.c
79 mv st_stubs.o st_stubs_b.o
04508f14 80
27676bd0 81@@ -46,7 +46,7 @@
04508f14 82 $(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS)
83
9de25172 84 st_stubs_n.o: st_stubs.c st_posix.h
27676bd0 85- $(NATIVECC) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \
e091ab7c
JB
86+ $(NATIVECC) $(CFLAGS) -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) \
87 $(SHAREDCCCOMPOPTS) -DNATIVE_CODE -DTARGET_$(ARCH) \
88 -DSYS_$(SYSTEM) -c st_stubs.c
9de25172 89 mv st_stubs.o st_stubs_n.o
27676bd0
JB
90--- ocaml-4.02.2/otherlibs/systhreads/Makefile.nt.orig 2015-06-28 13:45:16.216789823 +0200
91+++ ocaml-4.02.2/otherlibs/systhreads/Makefile.nt 2015-06-28 15:10:34.866575013 +0200
31cbf6d8 92@@ -20,7 +20,7 @@
27676bd0
JB
93 CAMLOPT=$(CAMLRUN) ../../ocamlopt -I ../../stdlib -I ../win32unix
94 COMPFLAGS=-w +33 -warn-error A -g
95 MKLIB=$(CAMLRUN) ../../tools/ocamlmklib
31cbf6d8
JR
96-CFLAGS=-I../../byterun $(EXTRACFLAGS)
97+override CFLAGS += -I../../byterun $(EXTRACFLAGS)
98
99 CAMLOBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
100 CMIFILES=$(CAMLOBJS:.cmo=.cmi)
27676bd0
JB
101--- ocaml-4.02.2/otherlibs/threads/Makefile.orig 2015-06-28 13:45:16.220123156 +0200
102+++ ocaml-4.02.2/otherlibs/threads/Makefile 2015-06-28 15:11:03.843240464 +0200
103@@ -18,7 +18,7 @@
104 CAMLYACC ?= ../../boot/ocamlyacc
04508f14 105
106 CC=$(BYTECC)
27676bd0
JB
107-CFLAGS=-I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
108+override CFLAGS += -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
e091ab7c 109 ROOTDIR=../..
27676bd0 110 CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib \
e091ab7c 111 -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix
27676bd0
JB
112--- ocaml-4.02.2/yacc/Makefile.orig 2015-06-28 13:45:16.220123156 +0200
113+++ ocaml-4.02.2/yacc/Makefile 2015-06-28 15:11:25.473239557 +0200
114@@ -15,7 +15,7 @@
04508f14 115 include ../config/Makefile
116
117 CC=$(BYTECC)
27676bd0 118-CFLAGS=-DNDEBUG $(BYTECCCOMPOPTS)
04508f14 119+override CFLAGS += -DNDEBUG $(BYTECCCOMPOPTS)
120
121 OBJS= closure.o error.o lalr.o lr0.o main.o mkpar.o output.o reader.o \
122 skeleton.o symtab.o verbose.o warshall.o
This page took 0.178125 seconds and 4 git commands to generate.