patch-Makefile 14 KB

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