File: Makefile.in

package info (click to toggle)
prooftree 0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid, stretch
  • size: 592 kB
  • ctags: 668
  • sloc: ml: 4,462; sh: 117; makefile: 111
file content (187 lines) | stat: -rw-r--r-- 4,920 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
## 
## prooftree --- proof tree display for Proof General
## 
## Copyright (C) 2011 - 2016 Hendrik Tews
## 
## This file is part of "prooftree".
## 
## "prooftree" is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
## 
## "prooftree" is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License in file COPYING in this or one of the parent
## directories for more details.
## 
## You should have received a copy of the GNU General Public License
## along with "prooftree". If not, see <http://www.gnu.org/licenses/>.
## 
## $Id: Makefile.in,v 1.29 2016/01/23 12:57:13 tews Exp $
## 
## Commentary: Makefile
## 

#############################################################################
##
## CONFIGURATION SECTION
##
#############################################################################

# The following variables are normally set by the configure script. 
# If this fails for some reason you can also rename Makefile.in to Makefile
# and set these variables manually.

# BINDIR: Directory where binaries are to be instelled. 
BINDIR:=@BINDIR@

# MANDIR: Directory where the man page is to be installed.
MANDIR:=@MANDIR@

# Should be ``prooftree.opt'' if you have ocamlopt.opt available.
# Should be ``prooftree.byte'' if you only have ocamlc.
prooftree: @PROOFTREE@

# ocaml compiler: should be ``ocamlopt.opt'' if available, ``ocamlc'' otherwise
OCAMLC:=@OCAMLC@

# ocaml dependency analyzer
# should be ``ocamldep.opt'' if available, ``ocamldep'' otherwise
OCAMLDEP:=@OCAMLDEP@

# ocaml documentation generator
# should be ``ocamldoc.opt'' if available, ``ocamldep'' otherwise
OCAMLDOC:=@OCAMLDOC@

# location of the lablgtk2 library
LABLGTKDIR:=@LABLGTKDIR@

#############################################################################
##
## END OF CONFIGURATION SECTION
##
#############################################################################

ODOC_CHECK:=/home/tews/src/odoc_check/odoc_check.cmxs
ODOC_XREF:=/home/tews/src/odoc_xref/odoc_xref.cmxs
LABLGTKURL:=/usr/share/doc/liblablgtk2-ocaml-doc/html/api


.PHONY: all
all: prooftree

ML_SOURCES:=\
	version.ml \
	util.ml \
	gtk_ext.ml \
	configuration.ml \
	draw_tree.ml \
	tree_layers.ml \
	about_window.ml \
	help_window.ml \
	node_window.ml \
	ext_dialog.ml \
	emacs_commands.ml \
	proof_window.ml \
	proof_tree.ml \
	coq.ml \
	input.ml \
	main.ml

MLI_SOURCES:=\
	version.mli \
	proof_tree.mli \
	input.mli

SOURCES:=$(MLI_SOURCES) $(ML_SOURCES)
CMO_OBJECTS:=$(ML_SOURCES:.ml=.cmo)
CMX_OBJECTS:=$(ML_SOURCES:.ml=.cmx)


TOCLEAN+=Makefile.deps
Makefile.deps : $(SOURCES)
	$(OCAMLDEP) $^ > Makefile.deps

include Makefile.deps

OCAMLFLAGS:=-safe-string -w Aem-48 -g -I $(LABLGTKDIR)

%.cmx: %.ml
	$(OCAMLC) -c $(OCAMLFLAGS) $<

%.cmo: %.ml
	$(OCAMLC) -c $(OCAMLFLAGS) $<

%.cmi: %.mli
	$(OCAMLC) -c $(OCAMLFLAGS) $<


TOCLEAN+=prooftree

.PHONY: prooftree.opt
prooftree.opt: $(CMX_OBJECTS)
	$(OCAMLC) -g -I $(LABLGTKDIR) -o prooftree \
		unix.cmxa lablgtk.cmxa gtkInit.cmx $^

.PHONY: prooftree.byte
prooftree.byte: $(CMO_OBJECTS)
	$(OCAMLC) -g -I $(LABLGTKDIR) -o prooftree \
		unix.cma lablgtk.cma gtkInit.cmo $^

TOCLEAN+=version.ml
version.ml: version.txt
	echo '(* This file is automatically generated from version.txt *)' > $@
	echo '(* DO NOT EDIT! *)' >> $@
	echo "let version = \"`head -1 version.txt`\"" >> $@

.PHONY: install
install:
	mkdir -p $(DESTDIR)$(BINDIR)
	cp prooftree $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	cp prooftree.1 $(DESTDIR)$(MANDIR)/man1


TOCLEAN+=dump.odoc-dump
dump.odoc-dump: $(SOURCES)
	$(OCAMLDOC) -I $(LABLGTKDIR) -d doc \
		-inv-merge-ml-mli -m A -dump $@ $(SOURCES)

.PHONY: doc
doc: dump.odoc-dump
	rm -rf doc
	mkdir doc
	$(OCAMLDOC) -I $(LABLGTKDIR) -d doc \
		-g $(ODOC_XREF) -libxref lablgtk $(LABLGTKURL) \
		-inv-merge-ml-mli -m A -load dump.odoc-dump
	$(OCAMLDOC) -I $(LABLGTKURL) -dot -dot-reduce \
		-o doc/dependencies.dot -load dump.odoc-dump
	dot -Tps doc/dependencies.dot > doc/dependencies.ps

.PHONY: check-doc
check-doc: dump.odoc-dump
	$(OCAMLDOC) -g $(ODOC_CHECK) -load dump.odoc-dump -check-all fcd

clean:
	rm -f $(TOCLEAN)
	rm -f *.cmi *.cmo *.cmx *.o *.cma *.cmxa *.a

TAGS: $(SOURCES)
	otags $(SOURCES)

prooftree.man.txt: prooftree.1
	nroff -man $< > $@

prooftree.man.html: prooftree.1
	man2html $< | \
		tail -n +3 |\
		sed -e 's|<A HREF=".*Return to Main Contents</A>||' \
		    -e 's|/cgi-bin/man/man2html?1.\([^"]*\)|http://www.linuxmanpages.com/man1/\1.1.php|' \
		    -e 's|HREF="/cgi-bin/man/man2html">man2html|HREF="http://www.nongnu.org/man2html/">man2html|' \
		> $@

.PHONY: sloc
sloc:
	wc $(SOURCES) | sort -n