~ubuntu-branches/debian/stretch/screen/stretch

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): Axel Beckert
  • Date: 2015-06-17 21:57:18 UTC
  • mfrom: (7.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20150617215718-mmj4dpghyl5a0ipy
Tags: 4.3.0-2
* Upload to unstable again.
* Re-add debian/dirs with /etc/tmpfiles.d/ and add a comment why screen
  ships an empty directory.
  + Fixes regression introduced in 4.2.1-4: If systemd is not installed
    and screen is either setuid or neither setuid nor setgid,
    /var/lib/dpkg/info/screen.postinst bailed out with "16:
    /var/lib/dpkg/info/screen.postinst: cannot create
    /etc/tmpfiles.d/screen-cleanup.conf: Directory nonexistent".
  + See comment in debian/dirs for more detailed reasoning.
* No more ship /lib/systemd/system/screen-cleanup.service in the package
  but link it to /dev/null in postinst and remove the link again in
  postrm. (LP: #1462692)
* Add fixed bugs reported in Ubuntu to previous changelog entry.
* Apply wrap-and-sort.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Makefile template for screen 
3
 
#
4
 
# See machine dependant config.h for more configuration options.
5
 
#
6
 
 
7
 
srcdir = .
8
 
 
9
 
 
10
 
DESTDIR = 
11
 
 
12
 
# Where to install screen.
13
 
 
14
 
prefix = /usr
15
 
exec_prefix = ${prefix}
16
 
datarootdir = ${prefix}/share
17
 
datadir = /usr/share
18
 
 
19
 
# don't forget to change mandir and infodir in doc/Makefile.
20
 
bindir  = $(exec_prefix)/bin
21
 
 
22
 
VERSION = 4.2.1
23
 
SCREEN = screen-$(VERSION)
24
 
 
25
 
GIT_REV = "`git describe --always 2>/dev/null`"
26
 
DEFS = -DHAVE_CONFIG_H -DGIT_REV=\"$(GIT_REV)\"
27
 
 
28
 
ETCSCREENRC = /etc/screenrc
29
 
ifeq (${ETCSCREENRC}, )
30
 
ETCSCREENRC=$(prefix)/etc/screenrc
31
 
endif
32
 
SCREENENCODINGS = $(datadir)/screen/utf8encodings
33
 
 
34
 
CC = x86_64-pc-linux-gnu-gcc
35
 
CFLAGS = -g -O2 -D_GNU_SOURCE
36
 
CPPFLAGS = -DNONETHACK -DETCSCREENRC='"$(ETCSCREENRC)"' \
37
 
           -DSCREENENCODINGS='"$(SCREENENCODINGS)"'
38
 
LDFLAGS = 
39
 
LIBS = -lcurses  -lelf -lutempter -lutil -lcrypt -lpam
40
 
 
41
 
CPP=x86_64-pc-linux-gnu-gcc -E
42
 
CPP_DEPEND=$(CC) -MM
43
 
 
44
 
INSTALL = /usr/bin/install -c
45
 
INSTALL_PROGRAM = ${INSTALL}
46
 
INSTALL_DATA = ${INSTALL} -m 644
47
 
 
48
 
AWK = gawk
49
 
 
50
 
### Chose some debug configuration options:
51
 
# -DDEBUG
52
 
#       Turn on really heavy debug output. This is written to 
53
 
#       /tmp/debug/{SCREEN,screen}.<pid>. Look at these files and quote 
54
 
#       questionable sections when sending bug-reports to the author.
55
 
# -DDUMPSHADOW
56
 
#       With shadow-pw screen would never dump core. Use this option if
57
 
#       you still want to have a core. Use only for debugging.
58
 
OPTIONS=
59
 
#OPTIONS= -DDEBUG
60
 
 
61
 
SHELL=/bin/sh
62
 
 
63
 
CFILES= screen.c ansi.c fileio.c mark.c misc.c resize.c socket.c \
64
 
        search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \
65
 
        termcap.c input.c attacher.c pty.c process.c display.c comm.c \
66
 
        kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \
67
 
        sched.c teln.c nethack.c encoding.c canvas.c layout.c viewport.c \
68
 
        list_display.c list_generic.c list_window.c
69
 
OFILES= screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \
70
 
        search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \
71
 
        termcap.o input.o attacher.o pty.o process.o display.o comm.o \
72
 
        kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \
73
 
        list_generic.o list_display.o list_window.o \
74
 
        sched.o teln.o nethack.o encoding.o canvas.o layout.o viewport.o
75
 
 
76
 
all:    screen
77
 
 
78
 
screen: $(OFILES)
79
 
        $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
80
 
 
81
 
.c.o:
82
 
        $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
83
 
            $(OPTIONS) $(CFLAGS) $<
84
 
 
85
 
install_bin: .version screen
86
 
        -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
87
 
                then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
88
 
        $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
89
 
        -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
90
 
# This doesn't work if $(bindir)/screen is a symlink
91
 
        -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
92
 
        rm -f $(DESTDIR)$(bindir)/screen
93
 
        (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen)
94
 
        cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
95
 
 
96
 
###############################################################################
97
 
install: installdirs install_bin
98
 
        cd doc ; $(MAKE) install
99
 
        -if [ -d /usr/lib/terminfo ]; then \
100
 
                PATH="$$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \
101
 
                chmod 644 /usr/lib/terminfo/s/screen*; \
102
 
        fi
103
 
# Better do this by hand. E.g. under RCS...
104
 
#       cat ${srcdir}/terminfo/screencap >> /etc/termcap
105
 
        @echo "termcap entry (${srcdir}/terminfo/screencap) should be installed manually."
106
 
        @echo "You may also want to install $(srcdir)/etc/etcscreenrc in" $(ETCSCREENRC)
107
 
 
108
 
installdirs:
109
 
# Path leading to ETCSCREENRC and Socketdirectory not checked.
110
 
        $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(SCREENENCODINGS)
111
 
        cd doc ; $(MAKE) installdirs
112
 
 
113
 
uninstall: .version
114
 
        rm -f $(DESTDIR)$(bindir)/$(SCREEN)
115
 
        rm -f $(DESTDIR)$(bindir)/screen
116
 
        -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen
117
 
        rm -f $(DESTDIR)$(ETCSCREENRC)
118
 
        cd doc; $(MAKE) uninstall
119
 
 
120
 
shadow:
121
 
        mkdir shadow;
122
 
        cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo ../etc .
123
 
        rm -f shadow/term.h shadow/tty.c shadow/comm.h shadow/osdef.h
124
 
        echo "install all Makefiles and config:" > shadow/Makefile
125
 
        echo "  rm -f config.cache" >> shadow/Makefile
126
 
        echo "  sh ./configure" >> shadow/Makefile
127
 
        
128
 
term.h: term.c term.sh
129
 
        AWK=$(AWK) srcdir=$(srcdir) sh $(srcdir)/term.sh
130
 
 
131
 
kmapdef.c: term.h
132
 
 
133
 
tty.c:  tty.sh 
134
 
        sh $(srcdir)/tty.sh tty.c
135
 
 
136
 
comm.h: comm.c comm.sh config.h
137
 
        AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
138
 
 
139
 
osdef.h: osdef.sh config.h osdef.h.in
140
 
        CPP="$(CPP) $(CPPFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
141
 
 
142
 
docs:
143
 
        cd doc; $(MAKE) dvi screen.info
144
 
 
145
 
dvi info screen.info:
146
 
        -cd doc; $(MAKE) $@
147
 
 
148
 
mostlyclean:
149
 
        rm -f $(OFILES) screen config.cache osdef0.c osdef1.sed osdef2.sed
150
 
 
151
 
clean celan: mostlyclean
152
 
        rm -f tty.c term.h comm.h osdef.h kmapdef.c core
153
 
 
154
 
# Delete all files from the current directory that are created by 
155
 
# configuring or building the program.
156
 
# building of term.h/comm.h requires awk. Keep it in the distribution
157
 
# we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC.
158
 
#distclean:     mostlyclean
159
 
#       rm -f $(SCREEN).tar $(SCREEN).tar.gz
160
 
#       rm -f config.status Makefile
161
 
#       rm -f osdef.h doc/Makefile
162
 
 
163
 
maintainer-clean:
164
 
        @echo "This command is not even intended for maintainers to use;"
165
 
        @echo "it deletes files that may require special tools to rebuild."
166
 
 
167
 
 
168
 
# Delete everything from the current directory that can be
169
 
# reconstructed with this Makefile.
170
 
realclean: .version mostlyclean
171
 
        rm -f $(SCREEN).tar $(SCREEN).tar.gz
172
 
        rm -f config.status Makefile doc/Makefile
173
 
        rm -f tty.c term.h comm.h osdef.h kmapdef.c
174
 
        rm -f config.h
175
 
        echo "install all Makefiles and config:" > Makefile
176
 
        echo "  sh ./configure" >> Makefile
177
 
 
178
 
tags TAGS: $(CFILES)
179
 
        -ctags    *.sh $(CFILES) *.h
180
 
        -etags    *.sh $(CFILES) *.h
181
 
 
182
 
dist: .version $(SCREEN).tar.gz
183
 
 
184
 
$(SCREEN).tar: .version term.h comm.h tty.c kmapdef.c
185
 
        -rm -rf dist
186
 
        mkdir dist
187
 
        mkdir dist/$(SCREEN)
188
 
        ln acls.h ansi.h display.h extern.h logfile.h mark.h os.h \
189
 
           layer.h patchlevel.h screen.h window.h image.h \
190
 
           osdef.h.in term.sh tty.sh comm.sh osdef.sh braille.h \
191
 
           sched.h \
192
 
           $(CFILES) \
193
 
           ChangeLog COPYING INSTALL NEWS* TODO install.sh \
194
 
           dist/$(SCREEN)
195
 
        cd dist/$(SCREEN); mv tty.c tty.c.dist
196
 
        cd dist/$(SCREEN); mv kmapdef.c kmapdef.c.dist
197
 
        ln configure.in configure dist/$(SCREEN)
198
 
        sed -e 's@"/local/screens@"/tmp/screens@' -e 's@"/local@"/usr/local@g' < config.h.in > dist/$(SCREEN)/config.h.in
199
 
        sed -e 's@[      ]/local@ /usr/local@g' -e 's/^CFLAGS = -g/CFLAGS = -O/' < Makefile.in > dist/$(SCREEN)/Makefile.in
200
 
        ln term.h dist/$(SCREEN)/term.h.dist
201
 
        ln comm.h dist/$(SCREEN)/comm.h.dist
202
 
        ln README dist/$(SCREEN)/README
203
 
        mkdir dist/$(SCREEN)/terminfo
204
 
        cd terminfo; ln 8bits README checktc.c screencap \
205
 
          screeninfo.src test.txt tetris.c \
206
 
          ../dist/$(SCREEN)/terminfo
207
 
        mkdir dist/$(SCREEN)/etc
208
 
        cd etc; ln * ../dist/$(SCREEN)/etc
209
 
        mkdir dist/$(SCREEN)/utf8encodings
210
 
        cd utf8encodings; ln * ../dist/$(SCREEN)/utf8encodings
211
 
        # sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/$(SCREEN)/etc/etcscreenrc 
212
 
        cp $(HOME)/.screenrc dist/$(SCREEN)/etc/screenrc
213
 
        mkdir dist/$(SCREEN)/doc
214
 
        sed -e 's@/local/emacs@/usr/local@g' < doc/Makefile.in > dist/$(SCREEN)/doc/Makefile.in
215
 
        cd doc; ln FAQ README.DOTSCREEN screen.1 screen.texinfo fdpat.ps make.help window_to_display.ps \
216
 
          ../dist/$(SCREEN)/doc
217
 
        cd doc; if test -f screen.info; then ln screen.info* \
218
 
           ../dist/$(SCREEN)/doc; fi
219
 
        cd dist/$(SCREEN)/doc; ln -s ../install.sh .
220
 
        cd dist/$(SCREEN); ln -s doc/FAQ .
221
 
        echo "install all Makefiles and config:" > dist/$(SCREEN)/Makefile
222
 
        echo "  rm -f config.cache" >> dist/$(SCREEN)/Makefile
223
 
        echo "  sh ./configure"     >> dist/$(SCREEN)/Makefile
224
 
        cd dist; tar cf ../$(SCREEN).tar $(SCREEN)
225
 
        rm -rf dist
226
 
 
227
 
$(SCREEN).tar.gz: $(SCREEN).tar
228
 
        gzip -nf $(SCREEN).tar || gzip -f $(SCREEN).tar
229
 
 
230
 
# Perform self-tests (if any).
231
 
check:
232
 
 
233
 
lint:
234
 
        lint -I. $(CFILES)
235
 
 
236
 
saber:
237
 
        #load $(CFLAGS) screen.c ansi.c $(LIBS)
238
 
 
239
 
config:
240
 
        rm -f config.cache
241
 
        sh ./configure
242
 
 
243
 
 
244
 
###############################################################################
245
 
 
246
 
.version:
247
 
        @rev=`sed < $(srcdir)/patchlevel.h -n -e '/#define REV/s/#define REV  *//p'`; \
248
 
        vers=`sed < $(srcdir)/patchlevel.h -n -e '/#define VERS/s/#define VERS  *//p'`; \
249
 
        pat=`sed < $(srcdir)/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL  *//p'`; \
250
 
        if [ "$${rev}.$${vers}.$${pat}" != "$(VERSION)" ]; then \
251
 
        echo "This distribution is screen-$${rev}.$${vers}.$${pat}, but"; \
252
 
        echo "the Makefile is from $(VERSION). Please update!"; exit 1; fi
253
 
 
254
 
###############################################################################
255
 
 
256
 
mdepend: $(CFILES) term.h
257
 
        @rm -f DEPEND ; \
258
 
        for i in ${CFILES} ; do \
259
 
          echo "$$i" ; \
260
 
          echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\
261
 
            cc -E $$i |\
262
 
            grep '^# .*"\./.*\.h"' |\
263
 
            (sort -t'"' -u -k 2,2 2>/dev/null || sort -t'"' -u +1 -2) |\
264
 
            sed -e 's/.*"\.\/\(.*\)".*/\1/'\
265
 
          ` >> DEPEND ; \
266
 
        done
267
 
 
268
 
 
269
 
depend: depend.in
270
 
        ./config.status || ./configure
271
 
        
272
 
depend.in: $(CFILES) term.h
273
 
        cp Makefile.in Makefile.in~
274
 
        sed -e '/\#\#\# Dependencies/q' < Makefile.in > tmp_make
275
 
        for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done 
276
 
        mv tmp_make Makefile.in
277
 
 
278
 
###############################################################################
279
 
 
280
 
### Dependencies:
281
 
screen.o: layout.h viewport.h canvas.h screen.c config.h screen.h os.h osdef.h ansi.h acls.h \
282
 
 comm.h layer.h term.h image.h display.h window.h braille.h \
283
 
 patchlevel.h logfile.h extern.h
284
 
ansi.o: layout.h viewport.h canvas.h ansi.c config.h screen.h os.h osdef.h ansi.h acls.h \
285
 
 comm.h layer.h term.h image.h display.h window.h braille.h extern.h \
286
 
 logfile.h
287
 
fileio.o: layout.h viewport.h canvas.h fileio.c config.h screen.h os.h osdef.h ansi.h acls.h \
288
 
 comm.h layer.h term.h image.h display.h window.h extern.h
289
 
mark.o: layout.h viewport.h canvas.h mark.c config.h screen.h os.h osdef.h ansi.h acls.h \
290
 
 comm.h layer.h term.h image.h display.h window.h mark.h extern.h
291
 
misc.o: layout.h viewport.h canvas.h misc.c config.h screen.h os.h osdef.h ansi.h acls.h \
292
 
 comm.h layer.h term.h image.h display.h window.h extern.h
293
 
resize.o: layout.h viewport.h canvas.h resize.c config.h screen.h os.h osdef.h ansi.h acls.h \
294
 
 comm.h layer.h term.h image.h display.h window.h extern.h
295
 
socket.o: layout.h viewport.h canvas.h socket.c config.h screen.h os.h osdef.h ansi.h acls.h \
296
 
 comm.h layer.h term.h image.h display.h window.h extern.h
297
 
search.o: layout.h viewport.h canvas.h search.c config.h screen.h os.h osdef.h ansi.h acls.h \
298
 
 comm.h layer.h term.h image.h display.h window.h mark.h extern.h
299
 
tty.o: layout.h viewport.h canvas.h tty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
300
 
 layer.h term.h image.h display.h window.h extern.h
301
 
term.o: layout.h viewport.h canvas.h term.c term.h
302
 
window.o: layout.h viewport.h canvas.h window.c config.h screen.h os.h osdef.h ansi.h acls.h \
303
 
 comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
304
 
utmp.o: layout.h viewport.h canvas.h utmp.c config.h screen.h os.h osdef.h ansi.h acls.h \
305
 
 comm.h layer.h term.h image.h display.h window.h extern.h
306
 
loadav.o: layout.h viewport.h canvas.h loadav.c config.h screen.h os.h osdef.h ansi.h acls.h \
307
 
 comm.h layer.h term.h image.h display.h window.h extern.h
308
 
putenv.o: layout.h viewport.h canvas.h putenv.c config.h
309
 
help.o: layout.h viewport.h canvas.h help.c config.h screen.h os.h osdef.h ansi.h acls.h \
310
 
 comm.h layer.h term.h image.h display.h window.h extern.h list_generic.h
311
 
termcap.o: layout.h viewport.h canvas.h termcap.c config.h screen.h os.h osdef.h ansi.h acls.h \
312
 
 comm.h layer.h term.h image.h display.h window.h extern.h
313
 
input.o: layout.h viewport.h canvas.h input.c config.h screen.h os.h osdef.h ansi.h acls.h \
314
 
 comm.h layer.h term.h image.h display.h window.h extern.h
315
 
attacher.o: layout.h viewport.h canvas.h attacher.c config.h screen.h os.h osdef.h ansi.h \
316
 
 acls.h comm.h layer.h term.h image.h display.h window.h extern.h
317
 
pty.o: layout.h viewport.h canvas.h pty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
318
 
 layer.h term.h image.h display.h window.h extern.h
319
 
process.o: layout.h viewport.h canvas.h process.c config.h screen.h os.h osdef.h ansi.h acls.h \
320
 
 comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
321
 
display.o: layout.h viewport.h canvas.h display.c config.h screen.h os.h osdef.h ansi.h acls.h \
322
 
 comm.h layer.h term.h image.h display.h window.h extern.h braille.h
323
 
canvas.o: layout.h viewport.h canvas.h canvas.c config.h screen.h os.h osdef.h ansi.h acls.h \
324
 
 comm.h layer.h term.h image.h display.h window.h extern.h \
325
 
 braille.h
326
 
comm.o: layout.h viewport.h canvas.h comm.c config.h acls.h comm.h
327
 
kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h
328
 
acls.o: layout.h viewport.h canvas.h acls.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
329
 
 layer.h term.h image.h display.h window.h extern.h
330
 
braille.o: layout.h viewport.h canvas.h braille.c config.h screen.h os.h osdef.h ansi.h acls.h \
331
 
 comm.h layer.h term.h image.h display.h window.h extern.h braille.h
332
 
braille_tsi.o: layout.h viewport.h canvas.h braille_tsi.c config.h screen.h os.h osdef.h ansi.h \
333
 
 acls.h comm.h layer.h term.h image.h display.h window.h extern.h \
334
 
 braille.h
335
 
logfile.o: layout.h viewport.h canvas.h logfile.c config.h screen.h os.h osdef.h ansi.h acls.h \
336
 
 comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
337
 
layer.o: layout.h viewport.h canvas.h layer.c config.h screen.h os.h osdef.h ansi.h acls.h \
338
 
 comm.h layer.h term.h image.h display.h window.h extern.h
339
 
sched.o: layout.h viewport.h canvas.h sched.c config.h screen.h os.h osdef.h ansi.h acls.h \
340
 
 comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
341
 
teln.o: layout.h viewport.h canvas.h teln.c config.h screen.h os.h osdef.h ansi.h acls.h \
342
 
 comm.h layer.h term.h image.h display.h window.h extern.h
343
 
nethack.o: layout.h viewport.h canvas.h nethack.c config.h screen.h os.h osdef.h ansi.h acls.h \
344
 
 comm.h layer.h term.h image.h display.h window.h extern.h
345
 
encoding.o: layout.h viewport.h canvas.h encoding.c config.h screen.h os.h osdef.h ansi.h acls.h \
346
 
 comm.h layer.h term.h image.h display.h window.h extern.h
347
 
layout.o: layout.h viewport.h canvas.h layout.c config.h screen.h os.h osdef.h ansi.h acls.h \
348
 
 comm.h layer.h term.h image.h display.h window.h extern.h \
349
 
 braille.h
350
 
viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \
351
 
 comm.h layer.h term.h image.h display.h window.h extern.h \
352
 
 braille.h
353
 
list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h
354
 
list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h
355
 
list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h
356