LuK1337 | 52a81d5 | 2025-07-08 18:07:20 -0400 | [diff] [blame] | 1 | # $Id: Makefile.in,v 1.79 2021/11/06 23:36:12 tom Exp $ |
| 2 | ############################################################################## |
| 3 | # Copyright 2018-2020,2021 Thomas E. Dickey # |
| 4 | # Copyright 1998-2016,2017 Free Software Foundation, Inc. # |
| 5 | # # |
| 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 | |
| 46 | SHELL = /bin/sh |
| 47 | |
| 48 | THIS = Makefile |
| 49 | |
| 50 | CF_MFLAGS = |
| 51 | |
| 52 | |
| 53 | DESTDIR = |
| 54 | top_srcdir = .. |
| 55 | srcdir = . |
| 56 | prefix = /usr |
| 57 | exec_prefix = ${prefix} |
| 58 | bindir = ${exec_prefix}/bin |
| 59 | libdir = ${exec_prefix}/lib |
| 60 | datarootdir = ${prefix}/share |
| 61 | datadir = ${datarootdir} |
| 62 | includesubdir = |
| 63 | |
| 64 | INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir) |
| 65 | |
| 66 | tabsetdir = $(datadir)/tabset |
| 67 | ticdir = /system_ext/etc/terminfo |
| 68 | ticfile = $(ticdir).db |
| 69 | source = ${top_srcdir}/misc/terminfo.src |
| 70 | |
| 71 | INSTALL = /usr/bin/install -c |
| 72 | INSTALL_PROGRAM = ${INSTALL} |
| 73 | INSTALL_SCRIPT = ${INSTALL} |
| 74 | INSTALL_DATA = ${INSTALL} -m 644 |
| 75 | |
| 76 | PKG_CONFIG_LIBDIR = /usr/local/lib/pkgconfig |
| 77 | |
| 78 | ################################################################################ |
| 79 | |
| 80 | .PHONY : all |
| 81 | .PHONY : check |
| 82 | .PHONY : clean |
| 83 | .PHONY : depend |
| 84 | .PHONY : distclean |
| 85 | .PHONY : install |
| 86 | .PHONY : install.data |
| 87 | .PHONY : install.libs |
| 88 | .PHONY : libs |
| 89 | .PHONY : mostlyclean |
| 90 | .PHONY : realclean |
| 91 | .PHONY : sources |
| 92 | .PHONY : uninstall |
| 93 | .PHONY : uninstall.data |
| 94 | .PHONY : uninstall.libs |
| 95 | |
| 96 | all \ |
| 97 | depend \ |
| 98 | sources :: |
| 99 | |
| 100 | all \ |
| 101 | sources :: terminfo.tmp |
| 102 | |
| 103 | install :: install.data |
| 104 | |
| 105 | install.data :: terminfo.tmp \ |
| 106 | $(DESTDIR)$(libdir) \ |
| 107 | $(DESTDIR)$(datadir) \ |
| 108 | $(DESTDIR)$(tabsetdir) |
| 109 | DESTDIR=${DESTDIR} \ |
| 110 | prefix=${prefix} \ |
| 111 | exec_prefix=${exec_prefix} \ |
| 112 | bindir=${bindir} \ |
| 113 | top_srcdir=${top_srcdir} \ |
| 114 | srcdir=${srcdir} \ |
| 115 | datadir=${datadir} \ |
| 116 | ticdir=${ticdir} \ |
| 117 | source=terminfo.tmp \ |
| 118 | cross_compiling=no \ |
| 119 | $(SHELL) ./run_tic.sh |
| 120 | @( cd $(srcdir)/tabset && \ |
| 121 | $(SHELL) -c 'for i in * ; do \ |
| 122 | if test -f $$i ; then \ |
| 123 | echo installing $$i; \ |
| 124 | $(INSTALL_DATA) $$i $(DESTDIR)$(tabsetdir)/$$i; \ |
| 125 | fi; done' ) |
| 126 | install.data :: |
| 127 | @echo "finished $@" |
| 128 | |
| 129 | NCURSES_CONFIG = ncursesw6-config |
| 130 | |
| 131 | install \ |
| 132 | install.libs :: $(DESTDIR)$(bindir) ncurses-config |
| 133 | $(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG) |
| 134 | |
| 135 | # Make a list of the files that gen-pkgconfig might create: |
| 136 | #PC_FILES = \ |
| 137 | # ncursesw.pc \ |
| 138 | # ncursesw.pc \ |
| 139 | # ticw.pc \ |
| 140 | # panelw.pc \ |
| 141 | # menuw.pc \ |
| 142 | # formw.pc \ |
| 143 | # ncurses++w.pc |
| 144 | |
| 145 | # 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 | #install \ |
| 149 | #install.libs :: pc-files |
| 150 | # @$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \ |
| 151 | # x/*) \ |
| 152 | # mkdir -p $(DESTDIR)$(PKG_CONFIG_LIBDIR); \ |
| 153 | # for name in $(PC_FILES); do \ |
| 154 | # test -f $$name || continue; \ |
| 155 | # echo installing $$name; \ |
| 156 | # $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \ |
| 157 | # done \ |
| 158 | # ;; \ |
| 159 | # *) \ |
| 160 | # echo "...skip actual install: no destination was given" ; \ |
| 161 | # ;; \ |
| 162 | # esac' |
| 163 | |
| 164 | #all \ |
| 165 | #sources :: pc-files |
| 166 | #pc-files : |
| 167 | # $(SHELL) ./gen-pkgconfig |
| 168 | # -touch $@ |
| 169 | |
| 170 | terminfo.tmp : run_tic.sed $(source) |
| 171 | echo '** adjusting tabset paths' |
| 172 | sed -f run_tic.sed $(source) >terminfo.tmp |
| 173 | |
| 174 | run_tic.sed : |
| 175 | WHICH_XTERM=xterm-new \ |
| 176 | XTERM_KBS=DEL \ |
| 177 | datadir=${datadir} \ |
| 178 | $(SHELL) $(srcdir)/gen_edit.sh >$@ |
| 179 | |
| 180 | $(DESTDIR)$(bindir) \ |
| 181 | $(DESTDIR)$(libdir) \ |
| 182 | $(DESTDIR)$(datadir) \ |
| 183 | $(DESTDIR)$(tabsetdir) : |
| 184 | mkdir -p $@ |
| 185 | |
| 186 | uninstall : uninstall.data uninstall.libs |
| 187 | |
| 188 | uninstall.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 | |
| 193 | uninstall.libs : |
| 194 | -rm -f $(DESTDIR)$(bindir)/$(NCURSES_CONFIG) |
| 195 | # @$(SHELL) -c 'case x$(DESTDIR)$(PKG_CONFIG_LIBDIR) in \ |
| 196 | # x/*) \ |
| 197 | # for name in $(PC_FILES); do \ |
| 198 | # test -f $$name || continue; \ |
| 199 | # echo uninstalling $$name; \ |
| 200 | # rm -f $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \ |
| 201 | # done \ |
| 202 | # ;; \ |
| 203 | # esac' |
| 204 | |
| 205 | tags : |
| 206 | |
| 207 | TAGS : |
| 208 | |
| 209 | mostlyclean : |
| 210 | -rm -f terminfo.tmp |
| 211 | -rm -f run_tic.sed |
| 212 | # -rm -f pc-files $(PC_FILES) |
| 213 | -rm -f core tags TAGS *~ *.bak *.ln *.atac trace |
| 214 | |
| 215 | clean :: mostlyclean |
| 216 | |
| 217 | distclean : clean |
| 218 | # -rm -f gen-pkgconfig |
| 219 | -rm -f Makefile run_tic.sh ncurses-config |
| 220 | |
| 221 | realclean : distclean |
| 222 | |
| 223 | ############################################################################### |
| 224 | # The remainder of this file is automatically generated during configuration |
| 225 | ############################################################################### |