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