blob: 1539973fef073ecffa55bd9a04e5d60c2caddb93 [file] [log] [blame]
micky3879b9f5e72025-07-08 18:04:53 -04001# $Id: Makefile.in,v 1.79 2021/11/06 23:36:12 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302##############################################################################
micky3879b9f5e72025-07-08 18:04:53 -04003# Copyright 2018-2020,2021 Thomas E. Dickey #
4# Copyright 1998-2016,2017 Free Software Foundation, Inc. #
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305# #
6# Permission is hereby granted, free of charge, to any person obtaining a #
7# copy of this software and associated documentation files (the "Software"), #
8# to deal in the Software without restriction, including without limitation #
9# the rights to use, copy, modify, merge, publish, distribute, distribute #
10# with modifications, sublicense, and/or sell copies of the Software, and to #
11# permit persons to whom the Software is furnished to do so, subject to the #
12# following conditions: #
13# #
14# The above copyright notice and this permission notice shall be included in #
15# all copies or substantial portions of the Software. #
16# #
17# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
18# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
19# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
20# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
21# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
22# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
23# DEALINGS IN THE SOFTWARE. #
24# #
25# Except as contained in this notice, the name(s) of the above copyright #
26# holders shall not be used in advertising or otherwise to promote the sale, #
27# use or other dealings in this Software without prior written #
28# authorization. #
29##############################################################################
30#
31# Author: Thomas E. Dickey 1996-on
32#
33# Makefile for ncurses miscellany directory
34#
35# This makes/installs the terminfo database
36#
37# The variable 'srcdir' refers to the source-distribution, and can be set with
38# the configure script by "--srcdir=DIR".
39#
40# The rules are organized to produce the libraries for the configured models,
41# and the programs with the configured default model.
42
43# turn off _all_ suffix rules; we'll generate our own
44.SUFFIXES :
45
Steve Kondikae271bc2015-11-15 02:50:53 +010046SHELL = @SHELL@
47VPATH = @srcdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048THIS = Makefile
49
50CF_MFLAGS = @cf_cv_makeflags@
51@SET_MAKE@
52
53DESTDIR = @DESTDIR@
54top_srcdir = @top_srcdir@
55srcdir = @srcdir@
56prefix = @prefix@
57exec_prefix = @exec_prefix@
58bindir = @bindir@
59libdir = @libdir@
Steve Kondikae271bc2015-11-15 02:50:53 +010060datarootdir = @datarootdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053061datadir = @datadir@
Steve Kondikae271bc2015-11-15 02:50:53 +010062includesubdir = @includesubdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053063
Steve Kondikae271bc2015-11-15 02:50:53 +010064INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053065
66tabsetdir = $(datadir)/tabset
67ticdir = @TERMINFO@
68ticfile = $(ticdir).db
69source = @TERMINFO_SRC@
70
71INSTALL = @INSTALL@
Steve Kondikae271bc2015-11-15 02:50:53 +010072INSTALL_PROGRAM = @INSTALL_PROGRAM@
73INSTALL_SCRIPT = @INSTALL_SCRIPT@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053074INSTALL_DATA = @INSTALL_DATA@
75
Steve Kondikae271bc2015-11-15 02:50:53 +010076PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
77
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053078################################################################################
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053079
micky3879b9f5e72025-07-08 18:04:53 -040080@MAKE_PHONY@.PHONY : all
81@MAKE_PHONY@.PHONY : check
82@MAKE_PHONY@.PHONY : clean
83@MAKE_PHONY@.PHONY : depend
84@MAKE_PHONY@.PHONY : distclean
85@MAKE_PHONY@.PHONY : install
86@MAKE_PHONY@.PHONY : install.data
87@MAKE_PHONY@.PHONY : install.libs
88@MAKE_PHONY@.PHONY : libs
89@MAKE_PHONY@.PHONY : mostlyclean
90@MAKE_PHONY@.PHONY : realclean
91@MAKE_PHONY@.PHONY : sources
92@MAKE_PHONY@.PHONY : uninstall
93@MAKE_PHONY@.PHONY : uninstall.data
94@MAKE_PHONY@.PHONY : uninstall.libs
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053095
micky3879b9f5e72025-07-08 18:04:53 -040096all \
97depend \
98sources ::
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053099
micky3879b9f5e72025-07-08 18:04:53 -0400100@MAKE_DATABASE@all \
101@MAKE_DATABASE@sources :: terminfo.tmp
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530102
micky3879b9f5e72025-07-08 18:04:53 -0400103@MAKE_DATABASE@install :: @MISC_INSTALL_DATA@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530104
micky3879b9f5e72025-07-08 18:04:53 -0400105@MAKE_DATABASE@install.data :: terminfo.tmp \
106@MAKE_DATABASE@ $(DESTDIR)$(libdir) \
107@MAKE_DATABASE@ $(DESTDIR)$(datadir) \
108@MAKE_DATABASE@ $(DESTDIR)$(tabsetdir)
109@MAKE_DATABASE@ DESTDIR=${DESTDIR} \
110@MAKE_DATABASE@ prefix=${prefix} \
111@MAKE_DATABASE@ exec_prefix=${exec_prefix} \
112@MAKE_DATABASE@ bindir=${bindir} \
113@MAKE_DATABASE@ top_srcdir=${top_srcdir} \
114@MAKE_DATABASE@ srcdir=${srcdir} \
115@MAKE_DATABASE@ datadir=${datadir} \
116@MAKE_DATABASE@ ticdir=${ticdir} \
117@MAKE_DATABASE@ source=terminfo.tmp \
118@MAKE_DATABASE@ cross_compiling=@cross_compiling@ \
119@MAKE_DATABASE@ $(SHELL) ./run_tic.sh
120@MAKE_DATABASE@ @( cd $(srcdir)/tabset && \
121@MAKE_DATABASE@ $(SHELL) -c 'for i in * ; do \
122@MAKE_DATABASE@ if test -f $$i ; then \
123@MAKE_DATABASE@ echo installing $$i; \
124@MAKE_DATABASE@ $(INSTALL_DATA) $$i $(DESTDIR)$(tabsetdir)/$$i; \
125@MAKE_DATABASE@ fi; done' )
126install.data ::
127 @echo "finished $@"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530128
micky3879b9f5e72025-07-08 18:04:53 -0400129NCURSES_CONFIG = ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@@cf_config_suffix@-config
130
131install \
Steve Kondikae271bc2015-11-15 02:50:53 +0100132install.libs :: $(DESTDIR)$(bindir) ncurses-config
133 $(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
134
micky3879b9f5e72025-07-08 18:04:53 -0400135# Make a list of the files that gen-pkgconfig might create:
136@MAKE_PC_FILES@PC_FILES = \
137@MAKE_PC_FILES@ @LIB_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
138@MAKE_PC_FILES@ @TINFO_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
139@MAKE_PC_FILES@ @TICS_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
140@MAKE_PC_FILES@ @PANEL_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
141@MAKE_PC_FILES@ @MENU_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
142@MAKE_PC_FILES@ @FORM_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc \
143@MAKE_PC_FILES@ @CXX_NAME@@USE_ARG_SUFFIX@@PC_MODULE_SUFFIX@.pc
Steve Kondikae271bc2015-11-15 02:50:53 +0100144
micky3879b9f5e72025-07-08 18:04:53 -0400145# some packagers prefer to be able to construct pc-files on servers where
146# pkg-config is not installed. Work around that by creating the library
147# directory during this rule:
148@MAKE_PC_FILES@install \
149@MAKE_PC_FILES@install.libs :: pc-files
150@MAKE_PC_FILES@ @$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \
151@MAKE_PC_FILES@ x/*) \
152@MAKE_PC_FILES@ mkdir -p $(DESTDIR)$(PKG_CONFIG_LIBDIR); \
153@MAKE_PC_FILES@ for name in $(PC_FILES); do \
154@MAKE_PC_FILES@ test -f $$name || continue; \
155@MAKE_PC_FILES@ echo installing $$name; \
156@MAKE_PC_FILES@ $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \
157@MAKE_PC_FILES@ done \
158@MAKE_PC_FILES@ ;; \
159@MAKE_PC_FILES@ *) \
160@MAKE_PC_FILES@ echo "...skip actual install: no destination was given" ; \
161@MAKE_PC_FILES@ ;; \
162@MAKE_PC_FILES@ esac'
163
164@MAKE_PC_FILES@all \
Steve Kondikae271bc2015-11-15 02:50:53 +0100165@MAKE_PC_FILES@sources :: pc-files
166@MAKE_PC_FILES@pc-files :
167@MAKE_PC_FILES@ $(SHELL) ./gen-pkgconfig
micky3879b9f5e72025-07-08 18:04:53 -0400168@MAKE_PC_FILES@ -touch $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530169
170terminfo.tmp : run_tic.sed $(source)
171 echo '** adjusting tabset paths'
172 sed -f run_tic.sed $(source) >terminfo.tmp
173
174run_tic.sed :
175 WHICH_XTERM=@WHICH_XTERM@ \
Steve Kondikae271bc2015-11-15 02:50:53 +0100176 XTERM_KBS=@XTERM_KBS@ \
177 datadir=${datadir} \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530178 $(SHELL) $(srcdir)/gen_edit.sh >$@
179
180$(DESTDIR)$(bindir) \
181$(DESTDIR)$(libdir) \
182$(DESTDIR)$(datadir) \
micky3879b9f5e72025-07-08 18:04:53 -0400183$(DESTDIR)$(tabsetdir) :
Steve Kondikae271bc2015-11-15 02:50:53 +0100184 mkdir -p $@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530185
Steve Kondikae271bc2015-11-15 02:50:53 +0100186uninstall : @MISC_UNINSTALL_DATA@ uninstall.libs
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530187
188uninstall.data :
189 -test -d $(DESTDIR)$(tabsetdir) && rm -rf $(DESTDIR)$(tabsetdir)
190 -test -d $(DESTDIR)$(ticdir) && rm -rf $(DESTDIR)$(ticdir)
191 -test -f $(DESTDIR)$(ticfile) && rm -f $(DESTDIR)$(ticfile)
192
193uninstall.libs :
194 -rm -f $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
micky3879b9f5e72025-07-08 18:04:53 -0400195@MAKE_PC_FILES@ @$(SHELL) -c 'case x$(DESTDIR)$(PKG_CONFIG_LIBDIR) in \
196@MAKE_PC_FILES@ x/*) \
197@MAKE_PC_FILES@ for name in $(PC_FILES); do \
198@MAKE_PC_FILES@ test -f $$name || continue; \
199@MAKE_PC_FILES@ echo uninstalling $$name; \
200@MAKE_PC_FILES@ rm -f $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \
201@MAKE_PC_FILES@ done \
202@MAKE_PC_FILES@ ;; \
203@MAKE_PC_FILES@ esac'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530204
205tags :
206
207@MAKE_UPPER_TAGS@TAGS :
208
209mostlyclean :
micky3879b9f5e72025-07-08 18:04:53 -0400210@MAKE_DATABASE@ -rm -f terminfo.tmp
211@MAKE_DATABASE@ -rm -f run_tic.sed
212@MAKE_PC_FILES@ -rm -f pc-files $(PC_FILES)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530213 -rm -f core tags TAGS *~ *.bak *.ln *.atac trace
214
215clean :: mostlyclean
216
217distclean : clean
Steve Kondikae271bc2015-11-15 02:50:53 +0100218@MAKE_PC_FILES@ -rm -f gen-pkgconfig
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530219 -rm -f Makefile run_tic.sh ncurses-config
220
221realclean : distclean
222
223###############################################################################
224# The remainder of this file is automatically generated during configuration
225###############################################################################