X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2FMakefile.in;h=077eeb001bebd576410b90849ba3b95b9f45275e;hp=a8bce99015d14f163d75c4b437f9e3cdcc134e4d;hb=5a9c046f10f72b47ad32801a8e54fe3d05aa8051;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c;ds=sidebyside diff --git a/progs/Makefile.in b/progs/Makefile.in index a8bce990..077eeb00 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,23 +1,34 @@ -# $Id: Makefile.in,v 1.21 1997/02/15 20:03:34 tom Exp $ -################################################################################ -# Copyright 1996,1997 by Thomas E. Dickey # -# 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. # -################################################################################ +# $Id: Makefile.in,v 1.72 2007/03/31 15:46:42 tom Exp $ +############################################################################## +# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a # +# copy of this software and associated documentation files (the "Software"), # +# to deal in the Software without restriction, including without limitation # +# the rights to use, copy, modify, merge, publish, distribute, distribute # +# with modifications, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the # +# following conditions: # +# # +# The above copyright notice and this permission notice shall be included in # +# all copies or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # +# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # +# DEALINGS IN THE SOFTWARE. # +# # +# Except as contained in this notice, the name(s) of the above copyright # +# holders shall not be used in advertising or otherwise to promote the sale, # +# use or other dealings in this Software without prior written # +# authorization. # +############################################################################## +# +# Author: Thomas E. Dickey 1996-on +# # Makefile for ncurses source code. # # This makes the ncurses utility programs. @@ -34,35 +45,47 @@ SHELL = /bin/sh THIS = Makefile -NC_MFLAGS = @nc_cv_makeflags@ +CF_MFLAGS = @cf_cv_makeflags@ @SET_MAKE@ +x = @EXEEXT@ +o = .@OBJEXT@ + MODEL = ../@DFT_OBJ_SUBDIR@ -INSTALL_PREFIX = @INSTALL_PREFIX@ +DESTDIR = @DESTDIR@ +top_srcdir = @top_srcdir@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ +libdir = @libdir@ includedir = @includedir@ datadir = @datadir@ -ticdir = $(datadir)/terminfo +LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_PROG = @INSTALL_PROGRAM@ +transform = @program_transform_name@ AWK = @AWK@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ -INCDIR = $(srcdir)/../include -CPPFLAGS = -I../progs -I$(srcdir) @CPPFLAGS@ \ - -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\" +INCDIR = $(top_srcdir)/include +CPPFLAGS = -I../progs -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) +CFLAGS_LIBTOOL = $(CCFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE CFLAGS_PROFILE = $(CCFLAGS) -pg @@ -70,14 +93,20 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) +REL_VERSION = @cf_cv_rel_version@ +ABI_VERSION = @cf_cv_abi_version@ +LOCAL_LIBDIR = @top_builddir@/lib + LD = @LD@ -LINK = $(CC) -LDFLAGS = -L../lib -lncurses@DFT_ARG_SUFFIX@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC) +LDFLAGS = @EXTRA_LDFLAGS@ \ + @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ -LDFLAGS_NORMAL = $(LDFLAGS) -LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ -LDFLAGS_PROFILE = $(LDFLAGS) -pg -LDFLAGS_SHARED = $(LDFLAGS) @CC_SHARED_OPTS@ +LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) +LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) +LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) +LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) +LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) @@ -86,122 +115,139 @@ LINT_OPTS = @LINT_OPTS@ LINT_LIBS = -lncurses @LIBS@ AUTO_SRC = \ - termsort.c + termsort.c \ + transform.h -PROGS = tic toe infocmp clear tput tset - -TESTPROGS = mvcur tctest hardscroll hashmap +# tic relies on direct access to the terminfo database +GET_PROGS = infocmp$x clear$x tput$x tset$x toe$x +PUT_PROGS = @MAKE_TERMINFO@ tic$x +PROGS = $(PUT_PROGS) $(GET_PROGS) # Default library, for linking applications -DEPS_CURSES = ../lib/libncurses@DFT_DEP_SUFFIX@ +DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ + +HEADER_DEPS = \ + ../include/curses.h \ + $(INCDIR)/term_entry.h \ + $(INCDIR)/tic.h \ + $(INCDIR)/nc_alloc.h ################################################################################ -all: $(AUTO_SRC) $(PROGS) +all: $(AUTO_SRC) $(PROGS) -install: install.progs +sources: $(AUTO_SRC) + +install: $(AUTO_SRC) install.progs +uninstall: uninstall.progs # this line simplifies the configure-script -install.libs: - -install.progs: $(PROGS) $(INSTALL_PREFIX)$(bindir) - $(INSTALL_PROGRAM) tic $(INSTALL_PREFIX)$(bindir)/tic - $(INSTALL_PROGRAM) toe $(INSTALL_PREFIX)$(bindir)/toe - $(INSTALL_PROGRAM) infocmp $(INSTALL_PREFIX)$(bindir)/infocmp - $(INSTALL_PROGRAM) clear $(INSTALL_PREFIX)$(bindir)/clear - $(INSTALL_PROGRAM) tput $(INSTALL_PREFIX)$(bindir)/tput - $(INSTALL_PROGRAM) tset $(INSTALL_PREFIX)$(bindir)/tset - @echo "linking captoinfo to tic" - -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo - (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic captoinfo) - @echo "linking reset to tset" - -@rm -f $(INSTALL_PREFIX)$(bindir)/reset - (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tset reset) - -$(INSTALL_PREFIX)$(bindir) : - $(srcdir)/../mkinstalldirs $@ +libs \ +install.libs \ +uninstall.libs: + +TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/' + +# transformed names for installing files +actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)` +actual_clear = `echo clear$x| $(TRANSFORM)` +actual_infocmp = `echo infocmp$x| $(TRANSFORM)` +actual_infotocap = `echo infotocap$x| $(TRANSFORM)` +actual_init = `echo init$x| $(TRANSFORM)` +actual_reset = `echo reset$x| $(TRANSFORM)` +actual_tic = `echo tic$x| $(TRANSFORM)` +actual_toe = `echo toe$x| $(TRANSFORM)` +actual_tput = `echo tput$x| $(TRANSFORM)` +actual_tset = `echo tset$x| $(TRANSFORM)` + +# transformed names for comparing at runtime +define_captoinfo = `echo captoinfo| $(TRANSFORM)` +define_infotocap = `echo infotocap| $(TRANSFORM)` +define_init = `echo init| $(TRANSFORM)` +define_reset = `echo reset| $(TRANSFORM)` + +transform.h : + echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@ + echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@ + echo "#define PROG_RESET \"$(define_reset)\"" >>$@ + echo "#define PROG_INIT \"$(define_init)\"" >>$@ + +install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir) +@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x $(DESTDIR)$(bindir)/$(actual_tic) +@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) toe$x $(DESTDIR)$(bindir)/$(actual_toe) +@MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)" +@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) +@MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap)) +@MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)" +@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) +@MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo)) + $(LIBTOOL_INSTALL) $(INSTALL_PROG) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp) + $(LIBTOOL_INSTALL) $(INSTALL_PROG) clear$x $(DESTDIR)$(bindir)/$(actual_clear) + $(LIBTOOL_INSTALL) $(INSTALL_PROG) tput$x $(DESTDIR)$(bindir)/$(actual_tput) + $(LIBTOOL_INSTALL) $(INSTALL_PROG) tset$x $(DESTDIR)$(bindir)/$(actual_tset) + @echo "linking $(actual_reset) to $(actual_tset)" + -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) + (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset)) + +uninstall.progs: +@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic) +@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe) +@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) +@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset) + -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) + +$(DESTDIR)$(bindir) : + sh $(srcdir)/../mkdirs.sh $@ # # Utilities normally built by make all start here # DEPS_TIC = \ - $(MODEL)/tic.o \ - $(MODEL)/dump_entry.o + $(MODEL)/tic$o \ + $(MODEL)/dump_entry$o -tic: $(DEPS_TIC) $(DEPS_CURSES) +tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@ DEPS_TOE = \ - $(MODEL)/toe.o \ - $(MODEL)/dump_entry.o + $(MODEL)/toe$o \ + $(MODEL)/dump_entry$o -toe: $(DEPS_TOE) $(DEPS_CURSES) +toe$x: $(DEPS_TOE) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@ DEPS_CLEAR = \ - $(MODEL)/clear.o + $(MODEL)/clear$o -clear: $(DEPS_CLEAR) $(DEPS_CURSES) +clear$x: $(DEPS_CLEAR) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@ DEPS_TPUT = \ - $(MODEL)/tput.o + $(MODEL)/tput$o -tput: $(DEPS_TPUT) $(DEPS_CURSES) +tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@ DEPS_INFOCMP = \ - $(MODEL)/infocmp.o \ - $(MODEL)/dump_entry.o + $(MODEL)/infocmp$o \ + $(MODEL)/dump_entry$o -infocmp: $(DEPS_INFOCMP) $(DEPS_CURSES) +infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@ DEPS_TSET = \ - $(MODEL)/tset.o \ - $(MODEL)/dump_entry.o + $(MODEL)/tset$o \ + $(MODEL)/dump_entry$o -tset: $(DEPS_TSET) $(DEPS_CURSES) +tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@ termsort.c: $(srcdir)/MKtermsort.sh - sh -c "$(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/Caps" >$@ - -# -# Test programs (not normally built by make all) start here. -# - -# Cursor movement optimization tester. Use -g for debugging but -O if you're -# profiling with intent to determine COMPUTE_OVERHEAD -MVFLAGS = -O -DEPS_MVCUR = \ - $(srcdir)/../ncurses/lib_mvcur.c \ - $(MODEL)/dump_entry.o - -mvcur: $(DEPS_MVCUR) $(DEPS_CURSES) - @ECHO_LINK@ $(LINK) $(CCFLAGS) -DTRACE -DMAIN $(MVFLAGS) $(DEPS_MVCUR) $(LDFLAGS_DEFAULT) -o $@ - -# Termcap-conversion tester -DEPS_TCTEST = \ - $(srcdir)/../ncurses/captoinfo.c - -tctest: $(DEPS_TCTEST) $(DEPS_CURSES) - @ECHO_LINK@ $(LINK) $(CCFLAGS) -DTRACE -DMAIN $(DEPS_TCTEST) $(LDFLAGS_DEFAULT) -o $@ - -# Demonstrator/tester for hardware-scrolling algorithm. -DEPS_HARDSCROLL = \ - $(srcdir)/../ncurses/hardscroll.c \ - $(MODEL)/lib_trace.o -hardscroll: - @ECHO_LINK@ $(LINK) $(CCFLAGS) -I$(srcdir)/../ncurses -DTRACE -DSCROLLDEBUG $(DEPS_HARDSCROLL) $(LDFLAGS_DEFAULT) -o $@ - -# Demonstrator-tester for enhanced hardware-scrolling code with hash mapping -DEPS_HASHMAP = \ - $(srcdir)/../ncurses/hashmap.c \ - $(srcdir)/../ncurses/hardscroll.c \ - $(MODEL)/lib_trace.o -hashmap: $(DEPS_HASHMAP) - @ECHO_LINK@ $(LINK) $(CCFLAGS) -I$(srcdir)/../ncurses -DTRACE -DHASHDEBUG $(DEPS_HASHMAP) -o $@ + sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@ # # Utility productions start here @@ -210,34 +256,36 @@ hashmap: $(DEPS_HASHMAP) tags: ctags *.[ch] -TAGS: - etags *.[ch] +@MAKE_UPPER_TAGS@TAGS: +@MAKE_UPPER_TAGS@ etags *.[ch] + +mostlyclean :: + -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace -clean :: - -rm -f tags TAGS do.tic *~ - -rm -f $(AUTO_SRC) $(TESTPROGS) +clean :: mostlyclean + -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" + -rm -f $(AUTO_SRC) -rm -f $(PROGS) + -rm -rf .libs distclean :: clean -rm -f Makefile -mostlyclean :: clean - realclean :: distclean # These rules are used to allow "make -n" to work on a clean directory-tree ../include/hashsize.h \ ../include/parametrized.h \ ../include/term.h : - cd ../include; $(MAKE) $(NC_MFLAGS) + cd ../include; $(MAKE) $(CF_MFLAGS) $(DEPS_CURSES) : - cd ../ncurses; $(MAKE) $(NC_MFLAGS) + cd ../ncurses; $(MAKE) $(CF_MFLAGS) lint: +@MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS) +@MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS) $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS) $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS) - $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c $(srcdir)/dump_entry.c $(LINT_LIBS) - $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS) $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS) $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(srcdir)/dump_entry.c $(LINT_LIBS)