File: Makefile

package info (click to toggle)
camltemplate 1.0.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: ml: 2,427; makefile: 296; sh: 51
file content (30 lines) | stat: -rw-r--r-- 885 bytes parent folder | download | duplicates (4)
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
TOP_DIR=..
-include $(TOP_DIR)/Makefile.config
include $(TOP_DIR)/Makefile.rules

BUILD_EXAMPLES := hello filetest thread
ALL_EXAMPLES := $(BUILD_EXAMPLES) mod_caml fastcgi
INSTALL_DIR := $(PREFIX)/share/$(PKGBASE)

.PHONY: all
all:
	set -e; for dir in $(BUILD_EXAMPLES); do cd $$dir; $(MAKE) all; cd ..; done

.PHONY: clean
clean:
	for dir in $(ALL_EXAMPLES); do cd $$dir; $(MAKE) clean; cd ..; done
	rm -f *~

.PHONY: install
install:
	rm -rf $(INSTALL_DIR)
	mkdir -p $(INSTALL_DIR)/examples
	cp $(TOP_DIR)/OCamlMakefile $(INSTALL_DIR)
	cp -r examples.rules $(ALL_EXAMPLES) $(INSTALL_DIR)/examples
	find $(INSTALL_DIR)/examples -type d -name CVS -prune -exec rm -rf \{} \;
	find $(INSTALL_DIR)/examples -type d -name ._d -prune -exec rm -rf \{} \;
	find $(INSTALL_DIR)/examples -type f -name .cvsignore -prune -exec rm -rf \{} \;

.PHONY: uninstall
uninstall:
	rm -rf $(INSTALL_DIR)