This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
162 lines (134 loc) · 4.07 KB
/
Makefile.in
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
TOOLSLIB = @complib@
SRCDIR = @srcdir@
BINDIR = @bindir@
LIBDIR = @libdir@
EMACSDIR = @emacsdir@
BUILDDIR = @builddir@
COMPILE= $(JAVAC) $(JFLAGS) -d src $(TOOLSLIB) $(SRC)
SHELL = /bin/sh
JSRCDIR = $(SRCDIR)/src/ucb/gjdb
.PHONY: default clean distclean doc maintainer-clean install tar zip
.SUFFIXES:
DISTFILES = lib/emacs/lisp/gjdb.el \
doc/*.sty doc/*.cls doc/Makefile.in doc/*.tex.in \
configure Makefile.in ChangeLog README NEWS \
bin/gjdb.in bin/meta-gjdb.in \
src/ucb/gjdb/*.java \
src/ucb/gjdb/ExpressionParser.y src/ucb/gjdb/ExpressionLexer.jf \
src/ucb/gjdb/CommandParser.y src/ucb/gjdb/CommandLexer.jf \
# NOTE: Keep the line below formatted exactly as is: "VERSION = version",
# left-justified, with no trailing spaces.
VERSION = 6.4.1
JAR = jar
JAVAC = javac
EMACS = emacs
JAVACC = javacc
JBISON = bison
JFLEX = jflex
JFLAGS = -g
JARFILE = src/gjdb.jar
SRC = $(JSRCDIR)/*.java \
$(GENERATED_SRC) \
Version.java
GENERATED_SRC = $(JSRCDIR)/ExpressionParser.java $(JSRCDIR)/ExpressionLexer.java \
$(JSRCDIR)/CommandParser.java $(JSRCDIR)/CommandLexer.java
default: $(JARFILE)
$(JARFILE): $(SRC)
$(COMPILE)
cd src; \
$(JAR) cvf ../$(JARFILE) ucb/gjdb/*.class
chmod 644 $(JARFILE)
$(JSRCDIR)/%.java: $(JSRCDIR)/%.y
rm -f $@
$(JBISON) --output=$@ -v $<
chmod a-w $@
$(JSRCDIR)/%.java: $(JSRCDIR)/%.jf
rm -f $@
ADDITIONAL_JARS=java_cup $(JFLEX) $<
chmod a-w $@
Version.java: Makefile
@echo Making Version.java...
@rm -f Version.java; \
echo "package ucb.gjdb;" > Version.java; \
echo "class Version {" >> Version.java; \
echo " static final String value = \"$(VERSION) (for JDK @jdk@)\";"\
>> Version.java; \
echo "}" >> Version.java
doc:
cd doc; $(MAKE) pdf
clean:
rm -f src/ucb/gjdb/*.class *~ src/ucb/gjdb/*~ \
src/ucb/gjdb/*.output \
$(JARFILE) Version.java
cd doc; \
if [ -f Makefile ]; then \
$(MAKE) clean; \
else \
$(MAKE) -f Makefile.in clean; \
fi
distclean:
if [ ! -f Makefile.in -a -f "$(SRCDIR)/Makefile.in" ]; then \
cd $(SRCDIR); $(MAKE) -f Makefile.in distclean; \
else \
$(MAKE) -f Makefile.in clean; \
rm -f Makefile doc/Makefile bin/gjdb bin/meta-gjdb config.status; \
fi
maintainer-clean:
if [ ! -f Makefile.in -a -f "$(SRCDIR)/Makefile.in" ]; then \
cd $(SRCDIR); $(MAKE) -f Makefile.in maintainer-clean; \
else \
$(MAKE) -f Makefile.in distclean; \
rm -f src/ucb/gjdb/*.java; \
fi
install: $(JARFILE)
-mkdir -p $(LIBDIR)
-cp -p $(JARFILE) $(LIBDIR);
-mkdir -p $(BINDIR)
-cp bin/gjdb $(BINDIR)/gjdb
-cp bin/meta-gjdb $(BINDIR)/meta-gjdb
chmod 755 $(BINDIR)/gjdb $(BINDIR)/meta-gjdb
-mkdir -p $(EMACSDIR)
-cp $(SRCDIR)/lib/emacs/lisp/gjdb.el $(EMACSDIR)
-$(EMACS) -batch -f batch-byte-compile $(EMACSDIR)/gjdb.el
-chmod 644 $(EMACSDIR)/gjdb.el $(EMACSDIR)/gjdb.elc
install-doc:
cd doc; $(MAKE) install
Makefile: $(SRCDIR)/Makefile.in
@if [ -r config.status ]; then \
CONFIG_FILE=Makefile; export CONFIG_FILE; . ./config.status; \
fi
DIR = .
DISTDIR = gjdb-$(VERSION)
# Run this in the source directory with
# make -f Makefile.in DIR=<file> tar
# or
# make -f Makefile.in DIR=<file> zip
# where <file> is the pathname of the directory that is to contain
# the resulting compressed archive.
tar:
@for f in $(GENERATED_SRC:@srcdir@/%=%); do \
if [ ! -f $$f ]; then \
echo "Must generate $$f first."; \
exit 1; \
fi; \
done
@tmp=/tmp/gjdb$$$$; \
rm -rf $$tmp; mkdir -p $$tmp/$(DISTDIR); \
tar cf - $(DISTFILES) | (cd $$tmp/$(DISTDIR); tar xf -); \
echo Creating $(DIR)/$(DISTDIR).tgz; \
(cd $$tmp; tar cf - $(DISTDIR) | gzip -c) > $(DIR)/$(DISTDIR).tgz; \
rm -rf $$tmp
zip:
@for f in $(GENERATED_SRC:@srcdir@/%=%); do \
if [ ! -f $$f ]; then \
echo "Must generate $$f first."; \
exit 1; \
fi; \
done
@tmp=/tmp/gjdb$$$$; \
rm -rf $$tmp; mkdir -p $$tmp/$(DISTDIR); \
tar cf - $(DISTFILES) | (cd $$tmp/$(DISTDIR); tar xf -); \
echo Creating $(DIR)/$(DISTDIR).tgz; \
dir=`(cd $(DIR); pwd)`; \
(cd $$tmp; zip -r $$dir/$(DISTDIR).Z $(DISTDIR)); \
rm -rf $$tmp