26
26
# to get definitions of all signals from <sys/signal.h>.
27
27
# _POSIX_SOURCE, _XOPEN_SOURCE are the obvious ones.
28
28
29
- datarootdir = @datarootdir@
30
29
prefix = @prefix@
30
+ datarootdir = @datarootdir@
31
+ datadir = @datadir@
31
32
exec_prefix = @exec_prefix@
32
33
mandir = @mandir@
33
34
bindir = @bindir@
34
35
srcdir = @srcdir@
36
+ testdir = @srcdir@/test
37
+
38
+ VPATH = $(srcdir )
35
39
36
40
37
41
SHELL = /bin/sh
38
42
CC = @CC@
43
+ YACC = @YACC@
39
44
INSTALL = @INSTALL@
45
+ INSTALL_PROGRAM = $(INSTALL )
46
+ INSTALL_DATA = $(INSTALL ) -m 644
40
47
MKDIR_P = @MKDIR_P@
41
48
42
49
43
- # # Bison is generating incorrect parsers. So do not use, for now
44
- # YACC = @YACC@
45
-
46
- CFLAGS = $(ADDCFLAGS ) -I. -I$(srcdir ) -W -Wall -Wno-implicit-fallthrough -Wno-cast-function-type -Wno-missing-field-initializers -Wno-unused-parameter -Wno-clobbered @CFLAGS@
47
- LDFLAGS = $(ADDLDFLAGS ) @LDFLAGS@
48
- LIBS = $(ADDLIBS ) @LIBS@
49
-
50
- VPATH = $(srcdir )
50
+ CFLAGS = @STRICT_CFLAGS@ -I. -I$(srcdir ) -W -Wall @READLINE_CFLAGS@ @CFLAGS@ $(ADDCFLAGS )
51
+ LDFLAGS = @LDFLAGS@ $(ADDLDFLAGS )
52
+ LIBS = @READLINE_LIBS@ @LIBS@ $(ADDLIBS )
51
53
52
54
HFILES = config.h es.h gc.h input.h prim.h print.h sigmsgs.h \
53
55
stdenv.h syntax.h term.h var.h
54
56
CFILES = access.c closure.c conv.c dict.c eval.c except.c fd.c gc.c glob.c \
55
- glom.c input.c heredoc.c list.c main.c match.c open.c \
57
+ glom.c input.c heredoc.c history.c list.c main.c match.c open.c \
56
58
prim-ctl.c prim-etc.c prim-io.c prim-sys.c prim-dump.c prim.c print.c proc.c \
57
59
sigmsgs.c signal.c split.c status.c str.c syntax.c term.c token.c \
58
60
tree.c util.c var.c vec.c version.c y.tab.c dump.c
59
61
OFILES = access.o closure.o conv.o dict.o eval.o except.o fd.o gc.o glob.o \
60
- glom.o input.o heredoc.o list.o main.o match.o open.o \
62
+ glom.o input.o heredoc.o history.o list.o main.o match.o open.o \
61
63
prim-ctl.o prim-etc.o prim-io.o prim-sys.o prim-dump.o prim.o print.o proc.o \
62
64
sigmsgs.o signal.o split.o status.o str.o syntax.o term.o token.o \
63
65
tree.o util.o var.o vec.o version.o y.tab.o
@@ -66,38 +68,46 @@ GEN = esdump y.tab.c y.tab.h y.output token.h sigmsgs.c initial.c
66
68
67
69
SIGFILES = @SIGFILES@
68
70
69
- es : ${ OFILES} initial.o
70
- ${CC} -o es ${ LDFLAGS} ${ OFILES} initial.o ${ LIBS}
71
+ es : $( OFILES ) initial.o
72
+ $( CC ) -o es $( LDFLAGS ) $( OFILES ) initial.o $( LIBS )
71
73
72
- esdump : ${ OFILES} dump.o
73
- ${CC} -o esdump ${ LDFLAGS} ${ OFILES} dump.o ${ LIBS}
74
+ esdump : $( OFILES ) dump.o
75
+ $( CC ) -o esdump $( LDFLAGS ) $( OFILES ) dump.o $( LIBS )
74
76
75
77
clean :
76
- rm -f es ${ OFILES} ${ GEN} dump.o initial.o
78
+ rm -f es $( OFILES ) $( GEN ) dump.o initial.o
77
79
78
- distclean : clean
80
+ distclean : clean testclean
79
81
rm -f config.cache config.log config.h Makefile cscope.out tags TAGS core cs.out config.status ltmain.sh
80
- rm -rf autom4te.cache
82
+ rm -rf autom4te.cache
81
83
82
84
MANIFEST :
83
85
find . -type f | sed s/..// > MANIFEST
84
86
85
87
install : es
86
88
$(MKDIR_P ) $(DESTDIR )$(bindir )
87
- $(INSTALL ) -s $( srcdir ) / es $(DESTDIR )$(bindir )
89
+ $(INSTALL_PROGRAM ) -s es $(DESTDIR )$(bindir )
88
90
$(MKDIR_P ) $(DESTDIR )$(mandir ) /man1
89
- $(INSTALL ) $(srcdir ) /doc/es.1 $(DESTDIR )$(mandir ) /man1
91
+ $(INSTALL_DATA ) $(srcdir ) /doc/es.1 $(DESTDIR )$(mandir ) /man1
92
+ $(MKDIR_P ) $(DESTDIR )$(datadir ) /es
93
+ $(INSTALL_DATA ) $(srcdir ) /share/* $(DESTDIR )$(datadir ) /es
90
94
91
- test : trip
95
+ testrun : $(testdir ) /testrun.c
96
+ $(CC ) -o testrun $(testdir ) /testrun.c
92
97
93
- trip : es $(srcdir ) /trip.es
94
- ./es < $(srcdir ) /trip.es
98
+ test : es testrun $(testdir ) /test.es
99
+ ./es -ps < $(testdir ) /test.es $(testdir ) /tests/*
100
+
101
+ testclean :
102
+ rm -f testrun
95
103
96
104
src :
97
- @echo ${OTHER} ${CFILES} ${HFILES}
105
+ @echo $(OTHER ) $(CFILES ) $(HFILES )
106
+
107
+ y.tab.h : parse.y
108
+ $(YACC ) -vd $(srcdir ) /parse.y
98
109
99
- y.tab.c y.tab.h : parse.y
100
- ${YACC} -vd $(srcdir ) /parse.y
110
+ y.tab.c : y.tab.h
101
111
102
112
token.h : y.tab.h
103
113
-cmp -s y.tab.h token.h || cp y.tab.h token.h
@@ -114,39 +124,39 @@ config.h : config.h.in
114
124
115
125
# --- dependencies ---
116
126
117
- access.o : access.c es.h config.h stdenv.h prim.h
118
- closure.o : closure.c es.h config.h stdenv.h gc.h
119
- conv.o : conv.c es.h config.h stdenv.h print.h
120
- dict.o : dict.c es.h config.h stdenv.h gc.h
121
- eval.o : eval.c es.h config.h stdenv.h
122
- except.o : except.c es.h config.h stdenv.h print.h
123
- fd.o : fd.c es.h config.h stdenv.h
124
- gc.o : gc.c es.h config.h stdenv.h gc.h
125
- glob.o : glob.c es.h config.h stdenv.h gc.h
126
- glom.o : glom.c es.h config.h stdenv.h gc.h
127
- input.o : input.c es.h config.h stdenv.h input.h
128
- heredoc.o : heredoc.c es.h config.h stdenv.h gc.h input.h syntax.h
129
- list .o : list .c es.h config.h stdenv.h gc.h
130
- main .o : main .c es.h config.h stdenv.h
131
- match .o : match .c es.h config.h stdenv.h
132
- open .o : open .c es.h config.h stdenv.h
133
- prim .o : prim .c es.h config.h stdenv.h prim.h
134
- prim-ctl .o : prim-ctl .c es.h config.h stdenv.h prim.h
135
- prim-etc .o : prim-etc .c es.h config.h stdenv.h prim.h
136
- prim-io .o : prim-io .c es.h config.h stdenv.h gc.h prim.h
137
- prim-sys .o : prim-sys .c es.h config.h stdenv.h prim .h
138
- prim-dump .o : prim-dump .c es.h config.h stdenv.h prim.h
139
- print.o : print.c es.h config.h stdenv.h print.h
140
- proc.o : proc.c es.h config.h stdenv.h prim.h
141
- signal.o : signal.c es.h config.h stdenv.h sigmsgs.h
142
- split.o : split.c es.h config.h stdenv.h gc.h
143
- status.o : status.c es.h config.h stdenv.h term.h
144
- str.o : str.c es.h config.h stdenv.h gc.h print.h
145
- syntax.o : syntax.c es.h config.h stdenv.h input.h syntax.h token.h
146
- term.o : term.c es.h config.h stdenv.h gc.h term.h
147
- token.o : token.c es.h config.h stdenv.h input.h syntax.h token.h
148
- tree.o : tree.c es.h config.h stdenv.h gc.h
149
- util.o : util.c es.h config.h stdenv.h
150
- var.o : var.c es.h config.h stdenv.h gc.h var.h term.h
151
- vec.o : vec.c es.h config.h stdenv.h gc.h
152
- version.o : version.c es.h config.h stdenv.h
127
+ access.o : access.c es.h config.h stdenv.h prim.h
128
+ closure.o : closure.c es.h config.h stdenv.h gc.h
129
+ conv.o : conv.c es.h config.h stdenv.h print.h
130
+ dict.o : dict.c es.h config.h stdenv.h gc.h
131
+ eval.o : eval.c es.h config.h stdenv.h
132
+ except.o : except.c es.h config.h stdenv.h print.h
133
+ fd.o : fd.c es.h config.h stdenv.h
134
+ gc.o : gc.c es.h config.h stdenv.h gc.h
135
+ glob.o : glob.c es.h config.h stdenv.h gc.h
136
+ glom.o : glom.c es.h config.h stdenv.h gc.h
137
+ input.o : input.c es.h config.h stdenv.h input.h
138
+ heredoc.o : heredoc.c es.h config.h stdenv.h gc.h input.h syntax.h
139
+ history .o : history .c es.h config.h stdenv.h gc.h input.h
140
+ list .o : list .c es.h config.h stdenv.h gc.h
141
+ main .o : main .c es.h config.h stdenv.h
142
+ match .o : match .c es.h config.h stdenv.h
143
+ open .o : open .c es.h config.h stdenv.h
144
+ prim.o : prim.c es.h config.h stdenv.h prim.h
145
+ prim-ctl .o : prim-ctl .c es.h config.h stdenv.h prim.h
146
+ prim-etc .o : prim-etc .c es.h config.h stdenv.h prim.h
147
+ prim-io .o : prim-io .c es.h config.h stdenv.h gc .h prim.h
148
+ prim-sys .o : prim-sys .c es.h config.h stdenv.h prim.h
149
+ print.o : print.c es.h config.h stdenv.h print.h
150
+ proc.o : proc.c es.h config.h stdenv.h prim.h
151
+ signal.o : signal.c es.h config.h stdenv.h sigmsgs.h
152
+ split.o : split.c es.h config.h stdenv.h gc.h
153
+ status.o : status.c es.h config.h stdenv.h term.h
154
+ str.o : str.c es.h config.h stdenv.h gc.h print.h
155
+ syntax.o : syntax.c es.h config.h stdenv.h input.h syntax.h token.h
156
+ term.o : term.c es.h config.h stdenv.h gc.h term.h
157
+ token.o : token.c es.h config.h stdenv.h input.h syntax.h token.h
158
+ tree.o : tree.c es.h config.h stdenv.h gc.h
159
+ util.o : util.c es.h config.h stdenv.h
160
+ var.o : var.c es.h config.h stdenv.h gc.h var.h term.h
161
+ vec.o : vec.c es.h config.h stdenv.h gc.h
162
+ version.o : version.c es.h config.h stdenv.h
0 commit comments