-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
178 lines (147 loc) · 4.86 KB
/
Makefile
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#******************************************************************************
#FILE: Makefile
#LANGUAGE: make
#SYSTEM: UNIX
#USER-INTERFACE: None
#DESCRIPTION
#USAGE
#AUTHORS
# <PJB> Pascal J. Bourguignon
#MODIFICATIONS
# 2003-01-17 <PJB> Added this header comment.
#BUGS
#LEGAL
# GPL
#
# Copyright Pascal J. Bourguignon 2003 - 2011
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
#******************************************************************************
TARGET := $(shell uname)
PREFIX := /usr/local
MAKEDIR := $(HOME)/src/public/common/makedir
SHARE_LISP=$(shell get-directory SHARE_LISP)
MODULE=emacs
PACKAGE_PATH=com/informatimago/emacs
PACKAGES=$(SHARE_LISP)/packages
EMACS_FLAGS= -l .emacs # -l pjb-cl.el
AWK = $(shell which awk)
# .el.elc: ; @echo '' ; echo Compiling $< ; emacs -batch -q $(EMACSFLAGS) -f batch-byte-compile $< 2>&1 | egrep -v -e 'Loading .*/fns-'
# See also .emacs in this directory with the load-path used to compile.
EMACS_SOURCES=\
pjb-advices.el \
pjb-asm7090.el \
pjb-banks.el \
pjb-bourse.el \
pjb-c.el \
pjb-cl.el \
pjb-cl-faces.el \
pjb-cl-magic.el \
pjb-class.el \
pjb-constants.el \
pjb-cvs.el \
pjb-cvspass.el \
pjb-erc.el \
pjb-font.el \
pjb-dot.el \
pjb-dodo.el \
pjb-emacs.el \
pjb-computer-paper.el \
pjb-euro.el \
pjb-graph.el \
pjb-i2p-expression.el \
pjb-layers.el \
pjb-list.el \
pjb-mail.el \
pjb-make-depends.el \
pjb-objc-mode.el \
pjb-object.el \
pjb-pgp.el \
pjb-queue.el \
pjb-roman.el \
pjb-s2p-expression.el \
pjb-secouer.el \
pjb-selftrade.el \
pjb-server.el \
pjb-sources.el \
pjb-state-coding.el \
pjb-shell.el \
pjb-strings.el \
pjb-transpose.el \
pjb-utilities.el \
pjb-vm-kill-file.el \
pjb-work.el \
pjb-worldfact.el
EMACS_OBJECTS=$(EMACS_SOURCES:.el=.elc)
LISP_OBJECTS=$(EMACS_OBJECTS)
all::$(EMACS_OBJECTS) summary.html
-@chmod a+r *
install::install-packages
TRACE=@
LISP_SOURCE_SUFFIXES= .el .lisp
LISP_OBJECT_SUFFIXES= .elc .fas .lib .x86f .fasl
.SUFFIXES:: $(LISP_SOURCE_SUFFIXES) $(LISP_OBJECT_SUFFIXES)
# ------------------------------------------------------------------------
# EMACS:
# ------------------------------------------------------------------------
EMACS=emacs
EMACS_FLAGS_DEFAULT=
%.elc : %.el
@ echo "Generating $@"
$(TRACE) $(EMACS) -batch -q $(EMACS_FLAGS) -f batch-byte-compile $< 2>&1 \
| $(AWK) 'BEGIN{s=0;} /Loading .*fns-/{next;} /Warning: Function .* from cl package/{s=1;next;} {if(s==0){print $0}else{s=0;next;}}'
# See also .emacs in this directory with the load-path used to compile.
# ------------------------------------------------------------------------
# Compiling & installing lisp packages:
#
# Targets: install-packages
# Input: LISP_SOURCES CLISP_SOURCES CMUCL_SOURCES SBCL_SOURCES EMACS_SOURCES
# Output: $(PACKAGES)/$(PACKAGE_PATH)/*
install-packages :: do-install
do-install :: $(EMACS_SOURCES) \
$(CMUCL_SOURCES) \
$(LISP_SOURCES) \
$(SBCL_SOURCES)
@ echo "Installing packages: $(LISP_SOURCES) $(EMACS_SOURCES) $(CLISP_SOURCES) $(CMUCL_SOURCES) $(SBCL_SOURCES)" | fmt
$(TRACE) umask 022 ;\
for f in $(LISP_SOURCES) $(LISP_OBJECTS) \
$(EMACS_SOURCES) $(CLISP_SOURCES) \
$(CMUCL_SOURCES) $(SBCL_SOURCES) ; do \
install -v -p -m 644 $$f $(PACKAGES)/$(PACKAGE_PATH)/$$f ;\
done
summary summary.html:$(EMACS_SOURCES)
@ true echo $(EMACS_SOURCES) ; echo $(EMACS_SOURCES:.el=)
@ clisp -q -x "(defparameter *sources* (quote ($(EMACS_SOURCES:.el=))))" \
-x "(load \"compile.lisp\")" -on-error debug
# ------------------------------------------------------------------------
# Cleaning:
clean::
-rm -f $(LISP_OBJECT_SUFFIXES:%=*%)
cleanall::
$(TRACE) for p in $(LISP_PROGRAMS) $(CLISP_PROGRAMS) $(SBCL_PROGRAMS) \
$(CMUCL_PROGRAMS) $(EMACS_PROGRAMS) NONE ; do \
[ "$$p" = NONE ] || $(MAKE) $(MFLAGS) $${p}-clean PGMNAME=$$p ;\
done
#include $(MAKEDIR)/lisp
#-include Makefile.depend
#
#install::install-packages
#
# depend Makefile.depend :: $(EMACS_SOURCES)
# touch Makefile.depend
# depend Makefile.depend :: $(EMACS_SOURCES)
# ./make-depends -I. $(EMACS_SOURCES:.el=.elc) >> Makefile.depend
#### Makefile -- -- ####