File: Makefile

package info (click to toggle)
mlpost 0.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,844 kB
  • sloc: ml: 21,094; javascript: 4,047; makefile: 430; ansic: 34; lisp: 19; sh: 15
file content (28 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (3)
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
MLFILES := $(shell echo *.ml)
MLFILES := $(MLFILES:myocamlbuild.ml=)
MLFILES := $(MLFILES:examples.ml=)

BUILD = _build/

OCAMLBUILD := ocamlbuild
ifeq ($(TERM), dumb)
	OCAMLBUILD := $(OCAMLBUILD) -classic-display
endif
ifneq ($(BUILD), _build/)
	OCAMLBUILD := $(OCAMLBUILD) -build-dir $(BUILD)
endif

HTML = $(BUILD)examples.html

all:
	$(OCAMLBUILD) $(MLFILES:.ml=.htmlpart)
	echo "<html><head><title>Mlpost Examples</title></head>" > $(HTML)
	echo "<body><h1>Mlpost Examples</h1>" >> $(HTML)
	cat $(BUILD)*.htmlpart >> $(HTML)
	echo "</body></html>" >> $(HTML)

clean:
	$(OCAMLBUILD) -clean
	rm -f *~

.PHONY: all