Documentation update
[clfswm.git] / Makefile.template
blob3ca0db69374c495ac70b70fa5d26c097ca82587b
1 # -*- makefile -*-
2 PROJECT_NAME=+PROJECT_NAME+
3 DESTDIR=+DESTDIR+
5 LISP=+LISP+
6 EVAL_OPT=+EVAL_OPT+
7 LOAD_OPT=+LOAD_OPT+
8 EXT=+EXT+
9 CORE=+CORE+
11 all: build
12         @echo "ALL"
14 build:
15         @echo "Building"
16         $(LISP) $(CORE) $(EVAL_OPT) '(progn (pushnew :BUILD *features*) (load "load.lisp") (quit))'
17         @echo ""
18         @echo "Type 'make install' to install $(PROJECT_NAME) in '$(DESTDIR)/bin/$(PROJECT_NAME)'"
19         @echo ""
21 install:
22         @echo "1) Installing: Creating directories"
23         mkdir -p $(DESTDIR)/lib/$(PROJECT_NAME)/src
24         mkdir -p $(DESTDIR)/lib/$(PROJECT_NAME)/contrib
25         mkdir -p $(DESTDIR)/bin
26         @echo "2) Installing: Copying files"
27         cp -R `pwd`/load.lisp $(DESTDIR)/lib/$(PROJECT_NAME)/
28         cp -R `pwd`/clfswm.asd $(DESTDIR)/lib/$(PROJECT_NAME)/
29         cp -R `pwd`/src/*.lisp  $(DESTDIR)/lib/$(PROJECT_NAME)/src
30         cp -R `pwd`/contrib/*   $(DESTDIR)/lib/$(PROJECT_NAME)/contrib
31         @sleep 1
32         cp -R `pwd`/src/*.$(EXT)  $(DESTDIR)/lib/$(PROJECT_NAME)/src
33         @echo "3) Installing: Creating starter script"
34         echo "#!/bin/sh" > $(DESTDIR)/bin/$(PROJECT_NAME)
35         echo "$(LISP) $(CORE) $(LOAD_OPT) $(DESTDIR)/lib/$(PROJECT_NAME)/load.lisp" >> $(DESTDIR)/bin/$(PROJECT_NAME)
36         chmod a+x $(DESTDIR)/bin/$(PROJECT_NAME)
37         @echo ""
38         @echo "$(PROJECT_NAME) has been installed in '$(DESTDIR)/bin/$(PROJECT_NAME)'"
39         @echo ""
42 uninstall:
43         rm -rf $(DESTDIR)/bin/$(PROJECT_NAME)
44         rm -rf $(DESTDIR)/lib/$(PROJECT_NAME)/
46 clean:
47         find . \( -name "*~" -o -name "*.fas" -o -name "*.fasl" -o -name "*.lib" -o -name "*.lx32fsl" -o -name "*.x86f" \) -print0 | xargs -0 rm -f
49 dist: clean
50         cd .. && tar czvf $(PROJECT_NAME)-`date +%y%m%d`.tar.gz $(PROJECT_NAME)