Skip to content

Commit e37e366

Browse files
committed
Merge branch 'master' into dwarf
2 parents 8aae10b + 3e01154 commit e37e366

33 files changed

+1612
-606
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ cparser/Parser.v
3939
cparser/Lexer.ml
4040
cparser/pre_parser.ml
4141
cparser/pre_parser.mli
42+
lib/Readconfig.ml
4243
lib/Tokenize.ml
4344
# Documentation
4445
doc/coq2html

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ doc/coq2html.ml: doc/coq2html.mll
174174
ocamllex -q doc/coq2html.mll
175175

176176
tools/ndfun: tools/ndfun.ml
177-
ocamlopt -o tools/ndfun str.cmxa tools/ndfun.ml $(LINKERSPEC)
177+
ocamlopt -o tools/ndfun str.cmxa tools/ndfun.ml
178178
tools/modorder: tools/modorder.ml
179-
ocamlopt -o tools/modorder str.cmxa tools/modorder.ml $(LINKERSPEC)
179+
ocamlopt -o tools/modorder str.cmxa tools/modorder.ml
180180

181181
latexdoc:
182182
cd doc; $(COQDOC) --latex -o doc/doc.tex -g $(FILES)
183183

184184
%.vo: %.v
185-
@rm -f doc/glob/$(*F).glob
185+
@rm -f doc/$(*F).glob
186186
@echo "COQC $*.v"
187187
@$(COQC) -dump-glob doc/$(*F).glob $*.v
188188

Makefile.extr

+12-13
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ endif
6161

6262
OCAMLC=ocamlc$(DOTOPT) $(COMPFLAGS)
6363
OCAMLOPT=ocamlopt$(DOTOPT) $(COMPFLAGS)
64-
OCAMLDEP=ocamldep$(DOTOPT) $(INCLUDES)
64+
OCAMLDEP=ocamldep$(DOTOPT) -slash $(INCLUDES)
6565

6666
# Compilers used for Camlp4-preprocessed code. Note that we cannot
6767
# use the .opt compilers (because ocamlfind doesn't support them).
@@ -75,9 +75,11 @@ OCAMLLEX=ocamllex -q
7575
MODORDER=tools/modorder .depend.extr
7676

7777
PARSERS=backend/CMparser.mly cparser/pre_parser.mly
78-
LEXERS=backend/CMlexer.mll cparser/Lexer.mll lib/Tokenize.mll
78+
LEXERS=backend/CMlexer.mll cparser/Lexer.mll \
79+
lib/Tokenize.mll lib/Readconfig.mll
7980

80-
LIBS=str.cmxa
81+
LIBS=str.cmxa unix.cmxa
82+
CHECKLINK_LIBS=str.cmxa
8183

8284
EXECUTABLES=ccomp ccomp.byte cchecklink cchecklink.byte clightgen clightgen.byte
8385
GENERATED=$(PARSERS:.mly=.mli) $(PARSERS:.mly=.ml) $(LEXERS:.mll=.ml)
@@ -90,23 +92,23 @@ CCOMP_OBJS:=$(shell $(MODORDER) driver/Driver.cmx)
9092

9193
ccomp: $(CCOMP_OBJS)
9294
@echo "Linking $@"
93-
@$(OCAMLOPT) -o $@ $(LIBS) $+ $(LINKERSPEC)
95+
@$(OCAMLOPT) -o $@ $(LIBS) $+
9496

9597
ccomp.byte: $(CCOMP_OBJS:.cmx=.cmo)
9698
@echo "Linking $@"
97-
@$(OCAMLC) -o $@ $(LIBS:.cmxa=.cma) $+ $(LINKERSPEC)
99+
@$(OCAMLC) -o $@ $(LIBS:.cmxa=.cma) $+
98100

99101
ifeq ($(CCHECKLINK),true)
100102

101103
CCHECKLINK_OBJS:=$(shell $(MODORDER) checklink/Validator.cmx)
102104

103105
cchecklink: $(CCHECKLINK_OBJS)
104106
@echo "Linking $@"
105-
@$(OCAMLOPT_P4) -linkpkg -o $@ $(LIBS) $+
107+
@$(OCAMLOPT_P4) -linkpkg -o $@ $(CHECKLINK_LIBS) $+
106108

107109
cchecklink.byte: $(CCHECKLINK_OBJS:.cmx=.cmo)
108110
@echo "Linking $@"
109-
@$(OCAMLC_P4) -linkpkg -o $@ $(LIBS:.cmxa=.cma) $+
111+
@$(OCAMLC_P4) -linkpkg -o $@ $(CHECKLINK_LIBS:.cmxa=.cma) $+
110112

111113
endif
112114

@@ -156,17 +158,14 @@ clean:
156158
rm -f $(GENERATED)
157159
for d in $(ALLDIRS); do rm -f $$d/*.cm[iox] $$d/*.o; done
158160

159-
cleansource:
160-
rm -f $(EXECUTABLES)
161-
for d in $(ALLDIRS); do rm -f $$d/*.cm[iox] $$d/*.o; done
162-
163161
# Generation of .depend.extr
164162

165163
depend: $(GENERATED)
166164
@echo "Analyzing OCaml dependencies"
167-
@for d in $(DIRS); do $(OCAMLDEP) $$d/*.mli $$d/*.ml; done > .depend.extr
165+
@$(OCAMLDEP) $(foreach d,$(DIRS),$(wildcard $(d)/*.mli $(d)/*.ml)) >.depend.extr
166+
@$(OCAMLDEP) $(GENERATED) >> .depend.extr
168167
ifneq ($(strip $(DIRS_P4)),)
169-
@for d in $(DIRS_P4); do $(OCAMLDEP_P4) $$d/*.mli $$d/*.ml; done >> .depend.extr
168+
@$(OCAMLDEP_P4) $(foreach d,$(DIRS_P4),$(wildcard $(d)/*.mli $(d)/*.ml)) >>.depend.extr
170169
endif
171170

172171

0 commit comments

Comments
 (0)