Debian Codegraph @

Makefile

raw
1 ## $Id: Makefile,v 1.34 2008/02/08 10:20:09 logik Exp $
2 # There are several possibilities to install Minlog:
3
4 # INSTALLATION IN CURRENT DIRECTORY
5 # > make
6
7 # INSTALLATION IN LOCAL DIRECTORY (i.e. /usr/local)
8 # > make install
9
10 # INSTALLATION IN SYSTEMS DIRECTORIES (i.e. /usr)
11 # make install DESTDIR=/usr
12
13 INSTALL=install
14 INSTALL_FILE=$(INSTALL) -D -p -m 644
15 INSTALL_DIR=$(INSTALL) -p -d -m 755
16 DESTDIR=/usr/local
17 PREFIX=
18 MINLOGDIR=$(DESTDIR)/share/minlog
19 DOCDIR=$(DESTDIR)/share/doc/minlog
20 BINDIR=$(DESTDIR)/bin
21 ELDIR=$(DESTDIR)/share/emacs/site-lisp/minlog
22
23 ## Makefile for Minlog. As most of the minlog project are just scheme sources
24 ## there's not much to be done. However it's nice to have some form of
25 ## interface for it.
26 ## The semantics of all the Makefiles used is the same:
27 ## -- .dep is the file that signals, when the dependencies have been
28 ## checked for the last time. This file is always younger
29 ## than the last check of all dependencies in all subdirectories
30 ## -- clean the target used to clean up the source. Should also remove
31 ## all the .dep files.
32
33 all: src init.scm mpc minlog minlog.el doc
34
35 install: src init.scm mpc minlog minlog.el doc
36 $(INSTALL_DIR) $(PREFIX)$(MINLOGDIR) $(PREFIX)$(BINDIR) $(PREFIX)$(ELDIR)
37 sed "s%---MINLOGPATH---%"$(MINLOGDIR)"%g; s%---MINLOGELPATH---%"$(ELDIR)"%g" < src/minlog.el > $(PREFIX)$(ELDIR)/minlog.el
38 $(INSTALL_FILE) minlog-mode.el $(PREFIX)$(ELDIR)/minlog-mode.el
39 sed "s%---MINLOGPATH---%"$(ELDIR)"%g" < src/minlog > $(PREFIX)$(BINDIR)/minlog
40 chmod a+x $(PREFIX)$(BINDIR)/minlog
41 sed "s%---MINLOGPATH---%"$(MINLOGDIR)"%g; s%(minlog-load \"examples/\" path))%(load (string-append \""$(DOCDIR)"/examples/\" path)))%g" < src/init.scm > $(PREFIX)$(MINLOGDIR)/init.scm
42 (cd src; find . -name '*.scm' -type f -exec $(INSTALL_FILE) {} $(PREFIX)$(MINLOGDIR)/src/{} \;)
43 (cd lib; find . -name '*.scm' -type f -exec $(INSTALL_FILE) {} $(PREFIX)$(MINLOGDIR)/lib/{} \;)
44 (cd modules; find . -name '*.scm' -type f -exec $(INSTALL_FILE) {} $(PREFIX)$(MINLOGDIR)/modules/{} \;)
45 (cd examples; find . -type f -a ! -path "*/CVS/*" -a ! -name ".cvsignore" -exec $(INSTALL_FILE) {} $(PREFIX)$(DOCDIR)/examples/{} \;)
46 (cd doc; find . -name '*.pdf' -type f -exec $(INSTALL_FILE) {} $(PREFIX)$(DOCDIR)/{} \;)
47
48 minlog.el: src/minlog.el src
49 sed "s%---MINLOGPATH---%`pwd`%g; s%---MINLOGELPATH---%`pwd`%g" < src/minlog.el > minlog.el
50
51 minlog: src/minlog src
52 sed "s%---MINLOGPATH---%`pwd`%g" < src/minlog > minlog
53 chmod a+x minlog
54
55 init.scm: src/init.scm src
56 sed "s%---MINLOGPATH---%`pwd`%g" < src/init.scm > init.scm
57
58 mpc: src/mpc init.scm
59 sed "s%---MINLOGPATH---%`pwd`%g" < src/mpc > mpc
60 chmod a+x mpc
61
62 doc: doc/.dep
63 doc/.dep:
64 (cd doc; $(MAKE) .dep)
65
66 src: src/.dep.notags
67 src/.dep.notags:
68 (cd src; $(MAKE) .dep.notags)
69
70 test: examples/.TEST
71
72 newtest:
73 (cd examples; $(MAKE) clean)
74 ($(MAKE) test)
75
76 alltest:
77 (cd examples; $(MAKE) clean)
78 ($(MAKE) -k -i test)
79
80 examples/.TEST: init.scm
81 (cd examples; $(MAKE) .TEST)
82
83 clean:
84 rm -rf *~
85 rm -rf init.scm mpc minlog minlog.el welcome.scm
86 (cd src; $(MAKE) clean)
87 (cd doc; $(MAKE) clean)
88 (cd examples; $(MAKE) clean)
89
90 # git demo
91 # git demo 3