ncurses 6.2 - patch 20210418
[ncurses.git] / progs / Makefile.in
index a2a6b777c44326e1ea004c7a5284ebdc40c41bdd..e1502ddc34a3bd82d9da0222bdd7c1d3c565ea8b 100644 (file)
@@ -1,6 +1,7 @@
-# $Id: Makefile.in,v 1.101 2016/12/31 15:05:18 tom Exp $
+# $Id: Makefile.in,v 1.110 2021/04/18 11:32:39 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2015,2016 Free Software Foundation, Inc.                #
+# Copyright 2020,2021 Thomas E. Dickey                                       #
+# Copyright 1998-2016,2018 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"), #
@@ -46,7 +47,7 @@ SHELL         = @SHELL@
 VPATH          = @srcdir@
 THIS           = Makefile
 
-CF_MFLAGS      = @cf_cv_makeflags@
+TOP_MFLAGS     = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)"
 @SET_MAKE@
 
 x              = @EXEEXT@
@@ -78,7 +79,7 @@ LIBTOOL_INSTALL       = @LIB_INSTALL@
 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
 
 INSTALL                = @INSTALL@
-INSTALL_PROG   = @INSTALL_PROGRAM@
+INSTALL_PROG   = @INSTALL_PROGRAM@ @INSTALL_OPT_S@
 transform      = @program_transform_name@
 
 AWK            = @AWK@
@@ -89,7 +90,7 @@ ETAGS         = @ETAGS@
 
 CC             = @CC@
 CPP            = @CPP@
-CFLAGS         = @CFLAGS@
+CFLAGS         = @CFLAGS@ @EXTRA_CFLAGS@
 
 INCDIR         = $(top_srcdir)/include
 CPPFLAGS       = -DHAVE_CONFIG_H -I../progs @CPPFLAGS@
@@ -97,9 +98,9 @@ CPPFLAGS      = -DHAVE_CONFIG_H -I../progs @CPPFLAGS@
 CCFLAGS                = $(CPPFLAGS) $(CFLAGS)
 
 CFLAGS_LIBTOOL = $(CCFLAGS)
-CFLAGS_NORMAL  = $(CCFLAGS)
-CFLAGS_DEBUG   = $(CCFLAGS) @CC_G_OPT@ -DTRACE
-CFLAGS_PROFILE = $(CCFLAGS) -pg
+CFLAGS_NORMAL  = $(CCFLAGS) -DNCURSES_STATIC
+CFLAGS_DEBUG   = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
+CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
 CFLAGS_SHARED  = $(CCFLAGS) @CC_SHARED_OPTS@
 
 CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@@ -132,7 +133,7 @@ LINT_OPTS   = @LINT_OPTS@
 LINT_LIBS      = -lncurses @LIBS@
 
 AUTO_SRC = \
-       termsort.c \
+       termsort.h \
        transform.h
 
 # tic relies on direct access to the terminfo database
@@ -202,10 +203,10 @@ install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
 @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@        ( 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))
+@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) tabs$x    $(DESTDIR)$(bindir)/$(actual_tabs)
@@ -213,7 +214,7 @@ install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
        $(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))
+       ( cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset) )
 
 uninstall.progs:
 @MAKE_TERMINFO@        -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic)
@@ -291,7 +292,7 @@ DEPS_TSET = \
 tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
        @ECHO_LD@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
 
-termsort.c: $(srcdir)/MKtermsort.sh
+termsort.h: $(srcdir)/MKtermsort.sh
        $(SHELL) $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
 
 #
@@ -322,18 +323,29 @@ realclean :: distclean
 ../include/hashsize.h \
 ../include/parametrized.h \
 ../include/term.h :
-       cd ../include; $(MAKE) $(CF_MFLAGS)
+       ( cd ../include && $(MAKE) $(TOP_MFLAGS) )
 $(DEPS_CURSES) :
-       cd ../ncurses; $(MAKE) $(CF_MFLAGS)
+       ( cd ../ncurses && $(MAKE) $(TOP_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)
+@MAKE_TERMINFO@        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.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)/tabs.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)
+       $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c                           $(LINT_LIBS)
+
+# Verify that each header-file can be compiled without including another.
+check:
+       @$(SHELL) -c "for header in *.h;\
+               do \
+                       echo \"** testing \$${header}\" ; \
+                       echo \"#include <\$${header}>\" >headers.c; \
+                       echo \"int main(void) { return 0; }\" >>headers.c; \
+                       $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
+               done"
+       -@rm -f headers.*
 
 ###############################################################################
 # The remainder of this file is automatically generated during configuration