2007-08-25 12:58:42 -06:00
## $XTermId: Makefile.in,v 1.148 2007/06/16 18:47:51 tom Exp $
2006-11-26 04:11:12 -07:00
##
## $XFree86: xc/programs/xterm/Makefile.in,v 3.56 2006/06/19 00:36:50 dickey Exp $ ##
##
2007-06-15 13:34:50 -06:00
## Copyright 2002-2006,2007 by Thomas E. Dickey
2006-11-26 04:11:12 -07:00
##
## All Rights Reserved
##
## Permission to use, copy, modify, and distribute this software and its
## documentation for any purpose and without fee is hereby granted,
## provided that the above copyright notice appear in all copies and that
## both that copyright notice and this permission notice appear in
## supporting documentation, and that the name of the above listed
## copyright holder(s) not be used in advertising or publicity pertaining
## to distribution of the software without specific, written prior
## permission.
##
## THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
## TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
## AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
## LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
x = @EXEEXT@
o = .@OBJEXT@
CC = @CC@
CPP = @CPP@
AWK = @AWK@
LINK = $( CC) $( CFLAGS)
LN_S = @LN_S@
RM = rm -f
LINT = @LINT@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
transform = @program_transform_name@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CPPFLAGS = @EXTRA_CPPFLAGS@
EXTRA_LOADFLAGS = @IMAKE_LOADFLAGS@
CPPFLAGS = -I. -I$( srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ $( EXTRA_CPPFLAGS)
CFLAGS = @CFLAGS@ $( EXTRA_CFLAGS)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
manext = 1
bindir = @bindir@
libdir = @libdir@
mandir = @mandir@/man$( manext)
appsdir = @appsdir@
2007-08-25 12:58:42 -06:00
icondir = @icondir@
2006-11-26 04:11:12 -07:00
#### End of system configuration section. ####
2007-03-24 16:18:54 -06:00
DESTDIR ?=
2006-11-26 04:11:12 -07:00
BINDIR = $( DESTDIR) $( bindir)
LIBDIR = $( DESTDIR) $( libdir)
MANDIR = $( DESTDIR) $( mandir)
APPSDIR = $( DESTDIR) $( appsdir)
2007-08-25 12:58:42 -06:00
ICONDIR = $( DESTDIR) $( icondir)
2006-11-26 04:11:12 -07:00
2007-08-25 12:58:42 -06:00
INSTALL_DIRS = $( BINDIR) $( APPSDIR) $( ICONDIR) $( MANDIR)
2006-11-26 04:11:12 -07:00
CLASS = XTerm
EXTRAHDR = @EXTRAHDRS@
EXTRASRC = @EXTRASRCS@
EXTRAOBJ = @EXTRAOBJS@
2007-06-15 13:34:50 -06:00
SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \
2006-11-26 04:11:12 -07:00
data.c doublechr.c fontutils.c input.c \
$( MAINSRC) menu.c misc.c print.c ptydata.c \
2007-06-15 13:34:50 -06:00
screen.c scrollbar.c tabs.c util.c xstrings.c xtermcap.c \
2006-11-26 04:11:12 -07:00
VTPrsTbl.c $( EXTRASRC)
2007-06-15 13:34:50 -06:00
OBJS1 = button$o cachedGCs$o charproc$o charsets$o cursor$o \
2006-11-26 04:11:12 -07:00
data$o doublechr$o fontutils$o input$o \
main$o menu$o misc$o print$o ptydata$o \
2007-06-15 13:34:50 -06:00
screen$o scrollbar$o tabs$o util$o xstrings$o xtermcap$o \
2006-11-26 04:11:12 -07:00
VTPrsTbl$o $( EXTRAOBJ)
SRCS2 = resize.c xstrings.c
OBJS2 = resize$o xstrings$o
SRCS = $( SRCS1) $( SRCS2)
OBJS = $( OBJS1) $( OBJS2)
HDRS = VTparse.h data.h error.h main.h menu.h proto.h \
2007-06-15 13:34:50 -06:00
ptyx.h version.h xstrings.h xterm.h xtermcap.h $( EXTRAHDR)
2006-11-26 04:11:12 -07:00
PROGRAMS = xterm$x resize$x
all : $( PROGRAMS )
2007-06-15 13:34:50 -06:00
################################################################################
.SUFFIXES : .i .def .hin .html .$( manext ) .ms .man .ps .pdf .txt
2006-11-26 04:11:12 -07:00
.c$o :
@ R U L E _ C C @
@ECHO_CC@$( CC) $( CPPFLAGS) $( CFLAGS) -c $( srcdir) /$* .c
.c.i :
@ R U L E _ C C @
@ECHO_CC@$( CPP) -C $( CPPFLAGS) $* .c >$@
.def.hin :
grep '^CASE_' $< | $( AWK) '{printf "#define %s %d\n", $$1, n++}' >$@
2007-06-15 13:34:50 -06:00
.man.$(manext) :
$( SHELL) $( srcdir) /minstall.sh " $( INSTALL_DATA) " $( srcdir) /xterm.man $@ $( appsdir)
.$(manext).html :
GROFF_NO_SGR = stupid $( SHELL) -c " tbl $* . $( manext) | groff -Thtml -man " >$@
.$(manext).ps :
$( SHELL) -c " tbl $* . $( manext) | groff -man " >$@
.$(manext).txt :
GROFF_NO_SGR = stupid $( SHELL) -c " tbl $* . $( manext) | nroff -Tascii -man | col -bx " >$@
.ms.html :
GROFF_NO_SGR = stupid $( SHELL) -c " tbl $* .ms | groff -Thtml -ms " >$@
.ms.ps :
$( SHELL) -c " tbl $* .ms | groff -ms " >$@
.ms.txt :
GROFF_NO_SGR = stupid $( SHELL) -c " tbl $* .ms | nroff -Tascii -ms | col -bx " >$@
.ps.pdf :
ps2pdf $* .ps
################################################################################
2006-11-26 04:11:12 -07:00
main$o : main .h
misc$o : version .h
$(OBJS1) : xterm .h ptyx .h xtermcfg .h
main$o resize$o screen$o : xterm_io .h
xterm$x : $( OBJS 1)
2007-06-15 13:34:50 -06:00
@ECHO_LD@$( LINK) $( LDFLAGS) -o $@ $( OBJS1) $( LIBS) $( EXTRA_LOADFLAGS)
2006-11-26 04:11:12 -07:00
resize$x : $( OBJS 2)
2007-06-15 13:34:50 -06:00
@ECHO_LD@$( SHELL) $( srcdir) /plink.sh $( LINK) $( LDFLAGS) -o $@ $( OBJS2) $( LIBS)
2006-11-26 04:11:12 -07:00
256colres.h :
-rm -f $@
perl $( srcdir) /256colres.pl > $@
88colres.h :
-rm -f $@
perl $( srcdir) /88colres.pl > $@
charproc$o : main .h @CHARPROC_DEPS @
2007-06-15 13:34:50 -06:00
################################################################################
2006-11-26 04:11:12 -07:00
actual_xterm = ` echo xterm| sed '$(transform)' `
actual_resize = ` echo resize| sed '$(transform)' `
actual_uxterm = ` echo uxterm| sed '$(transform)' `
binary_xterm = $( actual_xterm) $x
binary_resize = $( actual_resize) $x
binary_uxterm = $( actual_uxterm)
i n s t a l l \
i n s t a l l - b i n \
install-full :: xterm $x resize $x $( BINDIR )
@ M A Y _ S E T U I D @ $( SHELL ) $( srcdir ) / s i n s t a l l . s h @ S I N S T A L L _ O P T S @ "$(INSTALL_PROGRAM)" x t e r m $ x @ X T E R M _ P A T H @ $( BINDIR ) / $( binary_xterm )
@ N O T _ S E T U I D @ $( INSTALL_PROGRAM ) x t e r m $ x $( BINDIR ) / $( binary_xterm )
$( INSTALL_PROGRAM) -m 755 resize$x $( BINDIR) /$( binary_resize)
@$( SHELL) -c ' echo " ... installing $( BINDIR) / $( binary_uxterm) " ; \
if test " $( binary_xterm) " != "xterm" ; then \
name = " $( binary_xterm) " ; \
sed -e " s,=xterm,= $$ name, " $( srcdir) /uxterm >uxterm.tmp; \
$( INSTALL_SCRIPT) -m 755 uxterm.tmp $( BINDIR) /$( binary_uxterm) ; \
rm -f uxterm.tmp; \
else \
$( INSTALL_SCRIPT) -m 755 $( srcdir) /uxterm $( BINDIR) /$( binary_uxterm) ; \
fi '
2007-06-15 13:34:50 -06:00
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( BINDIR) && rm -f @XTERM_SYMLINK@ ; fi "
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( BINDIR) && $( LN_S) $( binary_xterm) @XTERM_SYMLINK@ ; fi "
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( BINDIR) && echo '... created symbolic link:' && ls -l $( binary_xterm) @XTERM_SYMLINK@ ; fi "
2006-11-26 04:11:12 -07:00
i n s t a l l \
i n s t a l l - m a n \
install-full :: $( MANDIR )
$( SHELL) $( srcdir) /minstall.sh " $( INSTALL_DATA) " $( srcdir) /xterm.man $( MANDIR) /$( actual_xterm) .$( manext) $( appsdir)
$( SHELL) $( srcdir) /minstall.sh " $( INSTALL_DATA) " $( srcdir) /resize.man $( MANDIR) /$( actual_resize) .$( manext) $( appsdir)
2007-06-15 13:34:50 -06:00
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( MANDIR) && rm -f @XTERM_SYMLINK@. $( manext) ; fi "
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( MANDIR) && $( LN_S) $( actual_xterm) . $( manext) @XTERM_SYMLINK@. $( manext) ; fi "
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( MANDIR) && echo '... created symbolic link:' && ls -l $( actual_xterm) . $( manext) @XTERM_SYMLINK@. $( manext) ; fi "
2006-11-26 04:11:12 -07:00
@ n o _ a p p s d i r @ i n s t a l l \
@ n o _ a p p s d i r @ i n s t a l l - a p p \
@no_appsdir@install-full :: $( APPSDIR )
@ n o _ a p p s d i r @ @ e c h o i n s t a l l i n g $( APPSDIR ) / $( CLASS )
@ n o _ a p p s d i r @ @ s e d - e s / X T e r m / $( CLASS ) / $( srcdir ) / X T e r m . a d > X T e r m . t m p
@ n o _ a p p s d i r @ @ $( INSTALL_DATA ) X T e r m . t m p $( APPSDIR ) / $( CLASS )
@ n o _ a p p s d i r @ @ e c h o i n s t a l l i n g $( APPSDIR ) / $( CLASS ) - c o l o r
@ n o _ a p p s d i r @ @ s e d - e s / X T e r m / $( CLASS ) / $( srcdir ) / X T e r m - c o l . a d > X T e r m . t m p
@ n o _ a p p s d i r @ @ $( INSTALL_DATA ) X T e r m . t m p $( APPSDIR ) / $( CLASS ) - c o l o r
@ n o _ a p p s d i r @ @ e c h o i n s t a l l i n g $( APPSDIR ) / U X T e r m
@ n o _ a p p s d i r @ @ s e d - e s / X T e r m / $( CLASS ) / $( srcdir ) / U X T e r m . a d > X T e r m . t m p
@ n o _ a p p s d i r @ @ $( INSTALL_DATA ) X T e r m . t m p $( APPSDIR ) / U X T e r m
@ n o _ a p p s d i r @ @ r m - f X T e r m . t m p
2007-08-25 12:58:42 -06:00
@ n o _ i c o n d i r @ @ e c h o "... installed app-defaults"
@ n o _ i c o n d i r @ i n s t a l l \
@ n o _ i c o n d i r @ i n s t a l l - i c o n \
@no_icondir@install-full :: $( ICONDIR )
@ n o _ i c o n d i r @ @ $( INSTALL_DATA ) $( srcdir ) / i c o n s / x t e r m - c o l o r _ 3 2 x 3 2 . x p m $( ICONDIR )
@ n o _ i c o n d i r @ @ $( INSTALL_DATA ) $( srcdir ) / i c o n s / x t e r m - c o l o r _ 4 8 x 4 8 . x p m $( ICONDIR )
@ n o _ i c o n d i r @ @ $( INSTALL_DATA ) $( srcdir ) / i c o n s / x t e r m _ 3 2 x 3 2 . x p m $( ICONDIR )
@ n o _ i c o n d i r @ @ $( INSTALL_DATA ) $( srcdir ) / i c o n s / x t e r m _ 4 8 x 4 8 . x p m $( ICONDIR )
@ n o _ i c o n d i r @ @ e c h o "... installed icons"
2006-11-26 04:11:12 -07:00
install ::
@echo 'Completed installation of executables and documentation.'
@echo 'Use "make install-ti" to install terminfo description.'
TERMINFO_DIR = @TERMINFO_DIR@
SET_TERMINFO = @SET_TERMINFO@
i n s t a l l - f u l l \
install-ti :: $( TERMINFO_DIR )
2007-06-15 13:34:50 -06:00
@$( SHELL) -c " $( SET_TERMINFO) $( srcdir) /run-tic.sh $( srcdir) /terminfo "
2006-11-26 04:11:12 -07:00
@echo 'Completed installation of terminfo description.'
i n s t a l l - f u l l \
install-tc ::
2007-06-15 13:34:50 -06:00
@-$( SHELL) -c "test -f /etc/termcap && echo 'You must install the termcap entry manually by editing /etc/termcap'"
2006-11-26 04:11:12 -07:00
installdirs : $( INSTALL_DIRS )
2007-06-15 13:34:50 -06:00
################################################################################
2006-11-26 04:11:12 -07:00
u n i n s t a l l \
u n i n s t a l l - b i n \
uninstall-full ::
-$( RM) $( BINDIR) /$( binary_xterm)
-$( RM) $( BINDIR) /$( binary_resize)
-$( RM) $( BINDIR) /$( binary_uxterm)
2007-06-15 13:34:50 -06:00
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( BINDIR) && rm -f @XTERM_SYMLINK@; fi "
2006-11-26 04:11:12 -07:00
u n i n s t a l l \
u n i n s t a l l - m a n \
uninstall-full ::
-$( RM) $( MANDIR) /$( actual_xterm) .$( manext)
-$( RM) $( MANDIR) /$( actual_resize) .$( manext)
2007-06-15 13:34:50 -06:00
@-$( SHELL) -c " if test @XTERM_SYMLINK@ != NONE ; then cd $( MANDIR) && rm -f @XTERM_SYMLINK@. $( manext) ; fi "
2006-11-26 04:11:12 -07:00
@ n o _ a p p s d i r @ u n i n s t a l l \
@ n o _ a p p s d i r @ u n i n s t a l l - a p p \
@no_appsdir@uninstall-full ::
@ n o _ a p p s d i r @ - $( RM ) $( APPSDIR ) / $( CLASS )
@ n o _ a p p s d i r @ - $( RM ) $( APPSDIR ) / $( CLASS ) - c o l o r
@ n o _ a p p s d i r @ - $( RM ) $( APPSDIR ) / U X T e r m
2007-08-25 12:58:42 -06:00
@ n o _ i c o n d i r @ u n i n s t a l l \
@ n o _ i c o n d i r @ u n i n s t a l l - i c o n \
@no_icondir@uninstall-full ::
@ n o _ i c o n d i r @ - $( RM ) $( ICONDIR ) / x t e r m - c o l o r _ 3 2 x 3 2 . x p m
@ n o _ i c o n d i r @ - $( RM ) $( ICONDIR ) / x t e r m _ 4 8 x 4 8 . x p m
@ n o _ i c o n d i r @ - $( RM ) $( ICONDIR ) / x t e r m - c o l o r _ 3 2 x 3 2 . x p m
@ n o _ i c o n d i r @ - $( RM ) $( ICONDIR ) / x t e r m _ 4 8 x 4 8 . x p m
################################################################################
# Desktop-utils does not provide an uninstall, and is not uniformly available.
@ d e s k t o p _ u t i l s @ DESKTOP_FLAGS = @DESKTOP_FLAGS@
@ d e s k t o p _ u t i l s @ i n s t a l l - d e s k t o p \
@desktop_utils@install-full ::
@ d e s k t o p _ u t i l s @ d e s k t o p - f i l e - i n s t a l l $( DESKTOP_FLAGS ) x t e r m . d e s k t o p
@ d e s k t o p _ u t i l s @ d e s k t o p - f i l e - i n s t a l l $( DESKTOP_FLAGS ) u x t e r m . d e s k t o p
2007-06-15 13:34:50 -06:00
################################################################################
2006-11-26 04:11:12 -07:00
mostlyclean :
-$( RM) *$o *.[ is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
clean : mostlyclean
-$( RM) $( PROGRAMS)
distclean : clean
-$( RM) Makefile config.status config.cache config.log xtermcfg.h
2007-06-15 13:34:50 -06:00
-$( RM) *.ps *.pdf *.png
-$( RM) xterm.html xterm.$( manext) xterm.txt
-$( RM) ctlseqs.html ctlseqs.$( manext)
2006-11-26 04:11:12 -07:00
realclean : distclean
2007-06-15 13:34:50 -06:00
-$( RM) tags TAGS
2006-11-26 04:11:12 -07:00
maintainer-clean : realclean
-$( RM) 256colres.h 88colres.h
2007-06-15 13:34:50 -06:00
################################################################################
2006-11-26 04:11:12 -07:00
ctlseqs.html : ctlseqs .ms
2007-06-15 13:34:50 -06:00
ctlseqs.pdf : ctlseqs .ps
2006-11-26 04:11:12 -07:00
ctlseqs.ps : ctlseqs .ms
2007-06-15 13:34:50 -06:00
ctlseqs.txt : ctlseqs .ms
################################################################################
xterm.html : xterm .$( manext )
xterm.pdf : xterm .ps
xterm.ps : xterm .$( manext )
xterm.txt : xterm .$( manext )
################################################################################
2006-11-26 04:11:12 -07:00
lint :
$( LINT) $( CPPFLAGS) $( SRCS1)
$( LINT) $( CPPFLAGS) $( SRCS2)
tags :
ctags $( SRCS) $( HDRS)
TAGS :
etags $( SRCS) $( HDRS)
$(TERMINFO_DIR) $(INSTALL_DIRS) :
$( SHELL) ${ srcdir } /mkdirs.sh $@
ALWAYS :
depend : $( TABLES )
makedepend -- $( CPPFLAGS) -- $( SRCS)
# DO NOT DELETE THIS LINE -- make depend depends on it.