package fixing
[profile/ivi/xterm.git] / Makefile.in
1 ## $XTermId: Makefile.in,v 1.174 2010/11/24 11:21:01 tom Exp $
2 # -----------------------------------------------------------------------------
3 # this file is part of xterm
4 #
5 # Copyright 1997-2009,2010 by Thomas E. Dickey
6 #
7 #                         All Rights Reserved
8 #
9 # Permission is hereby granted, free of charge, to any person obtaining a
10 # copy of this software and associated documentation files (the
11 # "Software"), to deal in the Software without restriction, including
12 # without limitation the rights to use, copy, modify, merge, publish,
13 # distribute, sublicense, and/or sell copies of the Software, and to
14 # permit persons to whom the Software is furnished to do so, subject to
15 # the following conditions:
16 #
17 # The above copyright notice and this permission notice shall be included
18 # in all copies or substantial portions of the Software.
19 #
20 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 # IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
24 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name(s) of the above copyright
29 # holders shall not be used in advertising or otherwise to promote the
30 # sale, use or other dealings in this Software without prior written
31 # authorization.
32 # -----------------------------------------------------------------------------
33
34 SHELL           = /bin/sh
35
36 #### Start of system configuration section. ####
37
38 srcdir          = @srcdir@
39 VPATH           = @srcdir@
40
41 x               = @EXEEXT@
42 o               = .@OBJEXT@
43
44 CC              = @CC@
45 CPP             = @CPP@
46 AWK             = @AWK@
47 LINK            = $(CC) $(CFLAGS)
48
49 CTAGS           = @CTAGS@
50 ETAGS           = @ETAGS@
51
52 LN_S            = @LN_S@
53 RM              = rm -f
54 LINT            = @LINT@
55
56 INSTALL         = @INSTALL@
57 INSTALL_PROGRAM = @INSTALL_PROGRAM@
58 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
59 INSTALL_DATA    = @INSTALL_DATA@
60 transform       = @program_transform_name@
61
62 EXTRA_CFLAGS    = @EXTRA_CFLAGS@
63 EXTRA_CPPFLAGS  = @EXTRA_CPPFLAGS@
64 EXTRA_LOADFLAGS = @IMAKE_LOADFLAGS@
65
66 CPPFLAGS        = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ $(EXTRA_CPPFLAGS)
67 CFLAGS          = @CFLAGS@ $(EXTRA_CFLAGS)
68 LDFLAGS         = @LDFLAGS@
69 LIBS            = @LIBS@
70
71 prefix          = @prefix@
72 exec_prefix     = @exec_prefix@
73
74 manext          = 1
75 bindir          = @bindir@
76 libdir          = @libdir@
77 mandir          = @mandir@/man$(manext)
78 appsdir         = @appsdir@
79 icondir         = @icondir@
80
81 #### End of system configuration section. ####
82
83 DESTDIR         =
84 BINDIR          = $(DESTDIR)$(bindir)
85 LIBDIR          = $(DESTDIR)$(libdir)
86 MANDIR          = $(DESTDIR)$(mandir)
87 APPSDIR         = $(DESTDIR)$(appsdir)
88 ICONDIR         = $(DESTDIR)$(icondir)
89
90 INSTALL_DIRS    = $(BINDIR) $(APPSDIR) $(ICONDIR) $(MANDIR)
91
92 CLASS           = XTerm
93 EXTRAHDR        = @EXTRAHDRS@
94 EXTRASRC        = @EXTRASRCS@
95 EXTRAOBJ        = @EXTRAOBJS@
96
97           SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \
98                   data.c doublechr.c fontutils.c input.c \
99                   linedata.c main.c menu.c misc.c \
100                   print.c ptydata.c scrollback.c \
101                   screen.c scrollbar.c tabs.c util.c xstrings.c xtermcap.c \
102                   VTPrsTbl.c $(EXTRASRC)
103           OBJS1 = button$o cachedGCs$o charproc$o charsets$o cursor$o \
104                   data$o doublechr$o fontutils$o input$o \
105                   linedata$o main$o menu$o misc$o \
106                   print$o ptydata$o scrollback$o \
107                   screen$o scrollbar$o tabs$o util$o xstrings$o xtermcap$o \
108                   VTPrsTbl$o $(EXTRAOBJ)
109           SRCS2 = resize.c xstrings.c
110           OBJS2 = resize$o xstrings$o
111            SRCS = $(SRCS1) $(SRCS2)
112            OBJS = $(OBJS1) $(OBJS2)
113            HDRS = VTparse.h data.h error.h main.h menu.h proto.h \
114                   ptyx.h version.h xstrings.h xterm.h xtermcap.h $(EXTRAHDR)
115        PROGRAMS = xterm$x resize$x
116
117 all :   $(PROGRAMS)
118 ################################################################################
119 .SUFFIXES : .i .def .hin .html .$(manext) .ms .man .ps .pdf .txt
120
121 .c$o :
122         @RULE_CC@
123         @ECHO_CC@$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/$*.c
124
125 .c.i :
126         @RULE_CC@
127         @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
128
129 .def.hin :
130         grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@
131
132 .man.$(manext) :
133         $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $< $@ $(appsdir)
134
135 .$(manext).html :
136         GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@
137
138 .$(manext).ps :
139         $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@
140
141 .$(manext).txt :
142         GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@
143
144 .ms.html :
145         GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | groff -Thtml -ms" >$@
146
147 .ms.ps :
148         $(SHELL) -c "tbl $*.ms | groff -ms" >$@
149
150 .ms.txt :
151         GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.ms | nroff -Tascii -ms | col -bx" >$@
152
153 .ps.pdf :
154         ps2pdf $*.ps
155 ################################################################################
156 main$o : main.h
157 misc$o : version.h
158
159 $(OBJS1) : xterm.h ptyx.h xtermcfg.h
160 main$o resize$o screen$o : xterm_io.h
161
162 xterm$x : $(OBJS1)
163         @ECHO_LD@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS) $(EXTRA_LOADFLAGS)
164
165 resize$x : $(OBJS2)
166         @ECHO_LD@$(SHELL) $(srcdir)/plink.sh $(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(LIBS)
167
168 256colres.h :
169         -rm -f $@
170         perl $(srcdir)/256colres.pl > $@
171
172 88colres.h :
173         -rm -f $@
174         perl $(srcdir)/88colres.pl > $@
175
176 charproc$o : main.h @CHARPROC_DEPS@
177 ################################################################################
178 actual_xterm  = `echo xterm|        sed '$(transform)'`
179 actual_resize = `echo resize|       sed '$(transform)'`
180 actual_uxterm = `echo uxterm|       sed '$(transform)'`
181 actual_k8term = `echo koi8rxterm|   sed '$(transform)'`
182
183 binary_xterm  = $(actual_xterm)$x
184 binary_resize = $(actual_resize)$x
185 binary_uxterm = $(actual_uxterm)
186 binary_k8term = $(actual_k8term)
187
188 install \
189 install-bin \
190 install-full :: xterm$x resize$x $(BINDIR)
191 @MAY_SETUID@    $(SHELL) $(srcdir)/sinstall.sh @SINSTALL_OPTS@ "$(INSTALL_PROGRAM)" xterm$x  @XTERM_PATH@ $(BINDIR)/$(binary_xterm)
192 @NOT_SETUID@    $(INSTALL_PROGRAM) xterm$x $(BINDIR)/$(binary_xterm)
193         $(INSTALL_PROGRAM) -m  755 resize$x $(BINDIR)/$(binary_resize)
194
195 install \
196 install-bin \
197 install-scripts \
198 install-full ::
199         @$(SHELL) -c "name=\"$(binary_xterm)\"; \
200                 dest=\"$(binary_uxterm)\"; \
201                 echo \"... installing $(BINDIR)/\$$dest\"; \
202                 if test \"\$$name\" != \"xterm\"; then \
203                         sed -e \"s,=xterm,=\$$name,\" $(srcdir)/uxterm >uxterm.tmp; \
204                         $(INSTALL_SCRIPT) -m  755 uxterm.tmp $(BINDIR)/\$$dest; \
205                         rm -f uxterm.tmp; \
206                 else \
207                         $(INSTALL_SCRIPT) -m  755 $(srcdir)/uxterm $(BINDIR)/\$$dest; \
208                 fi"
209         @$(SHELL) -c "name=\"$(binary_xterm)\"; \
210                 dest=\"$(binary_k8term)\"; \
211                 echo \"... installing $(BINDIR)/\$$dest\"; \
212                 if test \"\$$name\" != \"xterm\"; then \
213                         sed -e \"s,=xterm,=\$$name,\" $(srcdir)/koi8rxterm >k8term.tmp; \
214                         $(INSTALL_SCRIPT) -m  755 k8term.tmp $(BINDIR)/\$$dest; \
215                         rm -f k8term.tmp; \
216                 else \
217                         $(INSTALL_SCRIPT) -m  755 $(srcdir)/koi8rxterm $(BINDIR)/\$$dest; \
218                 fi"
219         @-$(SHELL) -c "name=\"$(binary_xterm)\"; \
220                 if test @XTERM_SYMLINK@ != NONE ; then \
221                 cd $(BINDIR) && ( \
222                         rm -f @XTERM_SYMLINK@ ; \
223                         $(LN_S) \$$name @XTERM_SYMLINK@ ; \
224                         echo \"... created symbolic link:\" ; \
225                         ls -l \$$name @XTERM_SYMLINK@ ) ; \
226                 fi"
227
228 install \
229 install-man \
230 install-full :: $(MANDIR)
231         $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/xterm.man    $(MANDIR)/$(actual_xterm).$(manext)  $(appsdir)
232         $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/resize.man   $(MANDIR)/$(actual_resize).$(manext) $(appsdir)
233         $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/uxterm.man   $(MANDIR)/$(actual_uxterm).$(manext) $(appsdir)
234         $(SHELL) $(srcdir)/minstall.sh "$(INSTALL_DATA)" $(srcdir)/koi8rxterm.man   $(MANDIR)/$(actual_k8term).$(manext) $(appsdir)
235         @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext) ; fi"
236         @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && $(LN_S) $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi"
237         @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && echo '... created symbolic link:' && ls -l $(actual_xterm).$(manext) @XTERM_SYMLINK@.$(manext) ; fi"
238
239 APP_NAMES = XTerm UXTerm KOI8RXTerm
240
241 @no_appsdir@install \
242 @no_appsdir@install-app \
243 @no_appsdir@install-full :: $(APPSDIR)
244 @no_appsdir@    @-$(SHELL) -c 'for s in $(APP_NAMES); \
245 @no_appsdir@    do \
246 @no_appsdir@            echo "** $$s"; \
247 @no_appsdir@            d=`echo $$s | sed -e s/XTerm/$(CLASS)/`; \
248 @no_appsdir@            echo installing $(APPSDIR)/$$d; \
249 @no_appsdir@            sed -e s/XTerm/$(CLASS)/ $(srcdir)/$$s.ad >XTerm.tmp; \
250 @no_appsdir@            $(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$$d; \
251 @no_appsdir@            echo installing $(APPSDIR)/$$d-color; \
252 @no_appsdir@            sed -e s/XTerm/$$d/ $(srcdir)/XTerm-col.ad >XTerm.tmp; \
253 @no_appsdir@            $(INSTALL_DATA) XTerm.tmp $(APPSDIR)/$$d-color; \
254 @no_appsdir@    done'
255 @no_appsdir@    @rm -f XTerm.tmp
256 @no_icondir@    @echo "... installed app-defaults"
257
258 @no_icondir@install \
259 @no_icondir@install-icon \
260 @no_icondir@install-full :: $(ICONDIR)
261 @no_icondir@    @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_32x32.xpm $(ICONDIR)
262 @no_icondir@    @$(INSTALL_DATA) $(srcdir)/icons/xterm-color_48x48.xpm $(ICONDIR)
263 @no_icondir@    @$(INSTALL_DATA) $(srcdir)/icons/xterm_32x32.xpm $(ICONDIR)
264 @no_icondir@    @$(INSTALL_DATA) $(srcdir)/icons/xterm_48x48.xpm $(ICONDIR)
265 @no_icondir@    @echo "... installed icons"
266
267 install ::
268         @echo 'Completed installation of executables and documentation.'
269         @echo 'Use "make install-ti" to install terminfo description.'
270
271 TERMINFO_DIR = @TERMINFO_DIR@
272 SET_TERMINFO = @SET_TERMINFO@
273
274 @no_ticprog@install-full \
275 @no_ticprog@install-ti :: $(TERMINFO_DIR)
276 @no_ticprog@    @$(SHELL) -c "$(SET_TERMINFO) $(srcdir)/run-tic.sh $(srcdir)/terminfo"
277 @no_ticprog@    @echo 'Completed installation of terminfo description.'
278
279 install-full \
280 install-tc ::
281         @-$(SHELL) -c "test -f /etc/termcap && echo 'You must install the termcap entry manually by editing /etc/termcap'"
282
283 installdirs : $(INSTALL_DIRS)
284 ################################################################################
285 uninstall \
286 uninstall-bin \
287 uninstall-full ::
288         -$(RM) $(BINDIR)/$(binary_xterm)
289         -$(RM) $(BINDIR)/$(binary_resize)
290         @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(BINDIR) && rm -f @XTERM_SYMLINK@; fi"
291
292 uninstall \
293 uninstall-bin \
294 uninstall-scripts \
295 uninstall-full ::
296         -$(RM) $(BINDIR)/$(binary_uxterm)
297         -$(RM) $(BINDIR)/$(binary_k8term)
298
299 uninstall \
300 uninstall-man \
301 uninstall-full ::
302         -$(RM) $(MANDIR)/$(actual_xterm).$(manext)
303         -$(RM) $(MANDIR)/$(actual_resize).$(manext)
304         -$(RM) $(MANDIR)/$(actual_uxterm).$(manext)
305         -$(RM) $(MANDIR)/$(actual_k8term).$(manext)
306         @-$(SHELL) -c "if test @XTERM_SYMLINK@ != NONE ; then cd $(MANDIR) && rm -f @XTERM_SYMLINK@.$(manext); fi"
307
308 @no_appsdir@uninstall \
309 @no_appsdir@uninstall-app \
310 @no_appsdir@uninstall-full ::
311 @no_appsdir@    @-$(SHELL) -c 'for s in $(APP_NAMES); \
312 @no_appsdir@    do \
313 @no_appsdir@            echo "** $$s"; \
314 @no_appsdir@            d=`echo $$s | sed -e s/XTerm/$(CLASS)/`; \
315 @no_appsdir@            echo uninstalling $(APPSDIR)/$$d; \
316 @no_appsdir@            $(RM) $(APPSDIR)/$$d; \
317 @no_appsdir@            echo uninstalling $(APPSDIR)/$$d-color; \
318 @no_appsdir@            $(RM) $(APPSDIR)/$$d-color; \
319 @no_appsdir@    done'
320
321 @no_icondir@uninstall \
322 @no_icondir@uninstall-icon \
323 @no_icondir@uninstall-full ::
324 @no_icondir@    -$(RM) $(ICONDIR)/xterm-color_32x32.xpm
325 @no_icondir@    -$(RM) $(ICONDIR)/xterm_32x32.xpm
326 @no_icondir@    -$(RM) $(ICONDIR)/xterm-color_48x48.xpm
327 @no_icondir@    -$(RM) $(ICONDIR)/xterm_48x48.xpm
328 ################################################################################
329 # Desktop-utils does not provide an uninstall, and is not uniformly available.
330 @desktop_utils@DESKTOP_FLAGS = @DESKTOP_FLAGS@
331 @desktop_utils@install-desktop \
332 @desktop_utils@install-full ::
333 @desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) xterm.desktop
334 @desktop_utils@ desktop-file-install $(DESKTOP_FLAGS) uxterm.desktop
335 ################################################################################
336 mostlyclean :
337         -$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
338
339 clean : mostlyclean
340         -$(RM) $(PROGRAMS)
341
342 distclean :: clean
343         -$(RM) Makefile config.status config.cache config.log xtermcfg.h
344
345 distclean \
346 docs-clean ::
347         -$(RM) *.ps *.pdf *.png
348         -$(SHELL) -c 'for p in xterm resize uxterm koi8rxterm; \
349         do \
350                 $(RM) $$p.html $$p.$(manext) $$p.txt; \
351         done'
352         -$(RM) ctlseqs.html ctlseqs.$(manext)
353
354 realclean : distclean
355         -$(RM) tags TAGS
356
357 maintainer-clean : realclean
358         -$(RM) 256colres.h 88colres.h
359 ################################################################################
360 terminfo.out : terminfo         ; tic -a -I -1 terminfo >$@
361 termcap.out : termcap           ; tic -a -C -U termcap >$@
362 ################################################################################
363 docs-ctlseqs \
364 docs :: ctlseqs.html \
365         ctlseqs.pdf \
366         ctlseqs.ps \
367         ctlseqs.txt
368 ctlseqs.html : ctlseqs.ms
369 ctlseqs.pdf : ctlseqs.ps
370 ctlseqs.ps : ctlseqs.ms
371 ctlseqs.txt : ctlseqs.ms
372 ################################################################################
373 docs-resize \
374 docs :: resize.html \
375         resize.pdf \
376         resize.ps \
377         resize.txt
378 resize.html : resize.$(manext)
379 resize.pdf : resize.ps
380 resize.ps : resize.$(manext)
381 resize.txt : resize.$(manext)
382 ################################################################################
383 docs-xterm \
384 docs :: xterm.html \
385         xterm.pdf \
386         xterm.ps \
387         xterm.txt
388 xterm.html : xterm.$(manext)
389 xterm.pdf : xterm.ps
390 xterm.ps : xterm.$(manext)
391 xterm.txt : xterm.$(manext)
392 ################################################################################
393 docs-uxterm \
394 docs :: uxterm.html \
395         uxterm.pdf \
396         uxterm.ps \
397         uxterm.txt
398 uxterm.html : uxterm.$(manext)
399 uxterm.pdf : uxterm.ps
400 uxterm.ps : uxterm.$(manext)
401 uxterm.txt : uxterm.$(manext)
402 ################################################################################
403 docs-koi8rxterm \
404 docs :: koi8rxterm.html \
405         koi8rxterm.pdf \
406         koi8rxterm.ps \
407         koi8rxterm.txt
408 koi8rxterm.html : koi8rxterm.$(manext)
409 koi8rxterm.pdf : koi8rxterm.ps
410 koi8rxterm.ps : koi8rxterm.$(manext)
411 koi8rxterm.txt : koi8rxterm.$(manext)
412 ################################################################################
413 lint :
414         $(LINT) $(CPPFLAGS) $(SRCS1)
415         $(LINT) $(CPPFLAGS) $(SRCS2)
416
417 tags :
418         $(CTAGS) $(SRCS) $(HDRS)
419
420 TAGS :
421         $(ETAGS) $(SRCS) $(HDRS)
422
423 $(TERMINFO_DIR) $(INSTALL_DIRS) :
424         mkdir -p $@
425
426 ALWAYS :
427
428 depend : $(TABLES)
429         makedepend -- $(CPPFLAGS) -- $(SRCS)
430
431 # DO NOT DELETE THIS LINE -- make depend depends on it.