Makefile 2.03 KB
Newer Older
gerd's avatar
gerd committed
1 2 3 4 5
# make all: compiles the configured packages with ocamlc
# make opt: compiles the configured packages with ocamlopt
# make install: installs the configured packages
# make clean: cleans everything up

gerd's avatar
gerd committed
6
NAME=pxp
gerd's avatar
gerd committed
7
TOP_DIR=.
gerd's avatar
gerd committed
8

9 10
include Makefile.rules

gerd's avatar
gerd committed
11
.PHONY: all
gerd's avatar
gerd committed
12 13 14
all:
	$(MAKE) -C tools all
	for pkg in $(PKGLIST); do $(MAKE) -C src/$$pkg all || exit; done
15
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg clean || exit; done
16 17
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg generate || exit; done
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg all || exit; done
gerd's avatar
gerd committed
18

gerd's avatar
gerd committed
19
.PHONY: opt
gerd's avatar
gerd committed
20 21
opt:
	for pkg in $(PKGLIST); do $(MAKE) -C src/$$pkg opt || exit; done
22
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg opt || exit; done
gerd's avatar
gerd committed
23

24 25 26 27 28 29 30 31 32 33 34 35
# The following are for development:
.PHONY: lexers
lexers:
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg generate || exit; done
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg all || exit; done

.PHONY: lexers-again
lexers-again:
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg clean || exit; done
	$(MAKE) lexers


gerd's avatar
gerd committed
36 37
# The following PHONY rule is important for Cygwin:
.PHONY: install
gerd's avatar
gerd committed
38 39
install:
	for pkg in $(PKGLIST); do $(MAKE) -C src/$$pkg install || exit; done
40
	for pkg in $(GENPKGLIST); do $(MAKE) -C gensrc/$$pkg install || exit; done
gerd's avatar
gerd committed
41

gerd's avatar
gerd committed
42
.PHONY: uninstall
gerd's avatar
gerd committed
43 44
uninstall:
	$(MAKE) -C src uninstall	
45
	for pkg in $(ALLGENPKGLIST); do $(OCAMLFIND) remove $$pkg; done
gerd's avatar
gerd committed
46

gerd's avatar
gerd committed
47 48
# On the toplevel, clean is CLEAN:

gerd's avatar
gerd committed
49
.PHONY: clean
gerd's avatar
gerd committed
50 51 52
clean:
	$(MAKE) -C tools CLEAN
	$(MAKE) -C src CLEAN
53
	for dir in gensrc/pxp-*; do $(MAKE) -C $$dir CLEAN || true; done
gerd's avatar
gerd committed
54 55
	$(MAKE) -C examples CLEAN
	$(MAKE) -C rtests CLEAN
56
	rm -f .testscript .testout
gerd's avatar
gerd committed
57

gerd's avatar
gerd committed
58
.PHONY: CLEAN
gerd's avatar
gerd committed
59 60
CLEAN: clean

gerd's avatar
gerd committed
61
.PHONY: distclean
gerd's avatar
gerd committed
62
distclean:
gerd's avatar
gerd committed
63
	rm -f *~ Makefile.conf
gerd's avatar
gerd committed
64 65 66 67
	$(MAKE) -C tools distclean
	$(MAKE) -C src distclean
	$(MAKE) -C examples distclean
	$(MAKE) -C rtests distclean
68
	test ! -f doc/Makefile || $(MAKE) -C doc distclean
gerd's avatar
gerd committed
69
	for dir in gensrc/pxp-*; do if [ -f $$dir/gen_dir ]; then rm -rf $$dir; else $(MAKE) -C $$dir distclean; fi; done
gerd's avatar
gerd committed
70

gerd's avatar
gerd committed
71
.PHONY: RELEASE
gerd's avatar
gerd committed
72
RELEASE:
gerd's avatar
gerd committed
73
	./configure -version >RELEASE
gerd's avatar
gerd committed
74