Project

General

Profile

Statistics
| Branch: | Revision:

corque / Makefile @ 4806fe22

History | View | Annotate | Download (5.94 KB)

1
#############################################################################
2
##  v      #                   The Coq Proof Assistant                     ##
3
## <O___,, #                INRIA - CNRS - LIX - LRI - PPS                 ##
4
##   \VV/  #                                                               ##
5
##    //   #  Makefile automagically generated by coq_makefile V8.4pl5     ##
6
#############################################################################
7

    
8
# WARNING
9
#
10
# This Makefile has been automagically generated
11
# Edit at your own risks !
12
#
13
# END OF WARNING
14

    
15
#
16
# This Makefile was generated by the command line :
17
# coq_makefile -f _Elgot -o Makefile 
18
#
19

    
20
.DEFAULT_GOAL := all
21

    
22
# 
23
# This Makefile may take arguments passed as environment variables:
24
# COQBIN to specify the directory where Coq binaries resides;
25
# ZDEBUG/COQDEBUG to specify debug flags for ocamlc&ocamlopt/coqc;
26
# DSTROOT to specify a prefix to install path.
27

    
28
# Here is a hack to make $(eval $(shell works:
29
define donewline
30

    
31

    
32
endef
33
includecmdwithout@ = $(eval $(subst @,$(donewline),$(shell { $(1) | tr -d '\r' | tr '\n' '@'; })))
34
$(call includecmdwithout@,$(COQBIN)coqtop -config)
35

    
36
##########################
37
#                        #
38
# Libraries definitions. #
39
#                        #
40
##########################
41

    
42
COQLIBS?=-I . 
43
COQDOCLIBS?=
44

    
45
##########################
46
#                        #
47
# Variables definitions. #
48
#                        #
49
##########################
50

    
51

    
52
OPT?=
53
COQDEP?="$(COQBIN)coqdep" -c
54
COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)
55
COQCHKFLAGS?=-silent -o
56
COQDOCFLAGS?=-interpolate -utf8
57
COQC?="$(COQBIN)coqc"
58
GALLINA?="$(COQBIN)gallina"
59
COQDOC?="$(COQBIN)coqdoc"
60
COQCHK?="$(COQBIN)coqchk"
61

    
62
##################
63
#                #
64
# Install Paths. #
65
#                #
66
##################
67

    
68
ifdef USERINSTALL
69
XDG_DATA_HOME?="$(HOME)/.local/share"
70
COQLIBINSTALL=$(XDG_DATA_HOME)/coq
71
COQDOCINSTALL=$(XDG_DATA_HOME)/doc/coq
72
else
73
COQLIBINSTALL="${COQLIB}user-contrib"
74
COQDOCINSTALL="${DOCDIR}user-contrib"
75
endif
76

    
77
######################
78
#                    #
79
# Files dispatching. #
80
#                    #
81
######################
82

    
83
VFILES:=Lemmas_biCCC.v\
84
  Coq_Steroids.v\
85
  biCCC.v\
86
  CofreeElgotMonad.v\
87
  Lemmas_ElgotMonad.v\
88
  ElgotMonad.v\
89
  lemma_9.v\
90
  Lemmas_CofreeElgotMonad.v
91

    
92
-include $(addsuffix .d,$(VFILES))
93
.SECONDARY: $(addsuffix .d,$(VFILES))
94

    
95
VOFILES:=$(VFILES:.v=.vo)
96
VOFILESINC=$(filter $(wildcard ./*),$(VOFILES)) 
97
GLOBFILES:=$(VFILES:.v=.glob)
98
VIFILES:=$(VFILES:.v=.vi)
99
GFILES:=$(VFILES:.v=.g)
100
HTMLFILES:=$(VFILES:.v=.html)
101
GHTMLFILES:=$(VFILES:.v=.g.html)
102
ifeq '$(HASNATDYNLINK)' 'true'
103
HASNATDYNLINK_OR_EMPTY := yes
104
else
105
HASNATDYNLINK_OR_EMPTY :=
106
endif
107

    
108
#######################################
109
#                                     #
110
# Definition of the toplevel targets. #
111
#                                     #
112
#######################################
113

    
114
all: $(VOFILES) 
115

    
116
spec: $(VIFILES)
117

    
118
gallina: $(GFILES)
119

    
120
html: $(GLOBFILES) $(VFILES)
121
	- mkdir -p html
122
	$(COQDOC) -toc $(COQDOCFLAGS) -html $(COQDOCLIBS) -d html $(VFILES)
123

    
124
gallinahtml: $(GLOBFILES) $(VFILES)
125
	- mkdir -p html
126
	$(COQDOC) -toc $(COQDOCFLAGS) -html -g $(COQDOCLIBS) -d html $(VFILES)
127

    
128
all.ps: $(VFILES)
129
	$(COQDOC) -toc $(COQDOCFLAGS) -ps $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
130

    
131
all-gal.ps: $(VFILES)
132
	$(COQDOC) -toc $(COQDOCFLAGS) -ps -g $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
133

    
134
all.pdf: $(VFILES)
135
	$(COQDOC) -toc $(COQDOCFLAGS) -pdf $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
136

    
137
all-gal.pdf: $(VFILES)
138
	$(COQDOC) -toc $(COQDOCFLAGS) -pdf -g $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
139

    
140
validate: $(VOFILES)
141
	$(COQCHK) $(COQCHKFLAGS) $(COQLIBS) $(notdir $(^:.vo=))
142

    
143
beautify: $(VFILES:=.beautified)
144
	for file in $^; do mv $${file%.beautified} $${file%beautified}old && mv $${file} $${file%.beautified}; done
145
	@echo 'Do not do "make clean" until you are sure that everything went well!'
146
	@echo 'If there were a problem, execute "for file in $$(find . -name \*.v.old -print); do mv $${file} $${file%.old}; done" in your shell/'
147

    
148
.PHONY: all opt byte archclean clean install userinstall depend html validate
149

    
150
####################
151
#                  #
152
# Special targets. #
153
#                  #
154
####################
155

    
156
byte:
157
	$(MAKE) all "OPT:=-byte"
158

    
159
opt:
160
	$(MAKE) all "OPT:=-opt"
161

    
162
userinstall:
163
	+$(MAKE) USERINSTALL=true install
164

    
165
install:
166
	install -d $(DSTROOT)$(COQLIBINSTALL)/$(INSTALLDEFAULTROOT); \
167
	for i in $(VOFILESINC); do \
168
	 install -m 0644 $$i $(DSTROOT)$(COQLIBINSTALL)/$(INSTALLDEFAULTROOT)/`basename $$i`; \
169
	done
170

    
171
install-doc:
172
	install -d "$(DSTROOT)"$(COQDOCINSTALL)/$(INSTALLDEFAULTROOT)/html
173
	for i in html/*; do \
174
	 install -m 0644 $$i "$(DSTROOT)"$(COQDOCINSTALL)/$(INSTALLDEFAULTROOT)/$$i;\
175
	done
176

    
177
clean:
178
	rm -f $(VOFILES) $(VIFILES) $(GFILES) $(VFILES:.v=.v.d) $(VFILES:=.beautified) $(VFILES:=.old)
179
	rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob $(VFILES:.v=.glob) $(VFILES:.v=.tex) $(VFILES:.v=.g.tex) all-mli.tex
180
	- rm -rf html mlihtml
181

    
182
archclean:
183
	rm -f *.cmx *.o
184

    
185
printenv:
186
	@"$(COQBIN)coqtop" -config
187
	@echo 'CAMLC =	$(CAMLC)'
188
	@echo 'CAMLOPTC =	$(CAMLOPTC)'
189
	@echo 'PP =	$(PP)'
190
	@echo 'COQFLAGS =	$(COQFLAGS)'
191
	@echo 'COQLIBINSTALL =	$(COQLIBINSTALL)'
192
	@echo 'COQDOCINSTALL =	$(COQDOCINSTALL)'
193

    
194
Makefile: _Elgot
195
	mv -f $@ $@.bak
196
	"$(COQBIN)coq_makefile" -f $< -o $@
197

    
198

    
199
###################
200
#                 #
201
# Implicit rules. #
202
#                 #
203
###################
204

    
205
%.vo %.glob: %.v
206
	$(COQC) $(COQDEBUG) $(COQFLAGS) $*
207

    
208
%.vi: %.v
209
	$(COQC) -i $(COQDEBUG) $(COQFLAGS) $*
210

    
211
%.g: %.v
212
	$(GALLINA) $<
213

    
214
%.tex: %.v
215
	$(COQDOC) $(COQDOCFLAGS) -latex $< -o $@
216

    
217
%.html: %.v %.glob
218
	$(COQDOC) $(COQDOCFLAGS) -html $< -o $@
219

    
220
%.g.tex: %.v
221
	$(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@
222

    
223
%.g.html: %.v %.glob
224
	$(COQDOC) $(COQDOCFLAGS)  -html -g $< -o $@
225

    
226
%.v.d: %.v
227
	$(COQDEP) -slash $(COQLIBS) "$<" > "$@" || ( RV=$$?; rm -f "$@"; exit $${RV} )
228

    
229
%.v.beautified:
230
	$(COQC) $(COQDEBUG) $(COQFLAGS) -beautify $*
231

    
232
# WARNING
233
#
234
# This Makefile has been automagically generated
235
# Edit at your own risks !
236
#
237
# END OF WARNING
238