Imported from ../bash-2.0.tar.gz.
[platform/upstream/bash.git] / lib / termcap / grot / Makefile.in
index 309603d..66e5d02 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU termcap library.
-# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,26 +21,20 @@ srcdir = @srcdir@
 VPATH = @srcdir@
 
 CC = @CC@
+AR = ar
+RANLIB = @RANLIB@
 
-# If you don't have a BSD or GNU install program, use cp.
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 
 MAKEINFO = makeinfo
 
-# Things you might add to DEFS:
-# -DHAVE_STRING_H      If you have memcpy instead of bcopy.
-# -DNO_ARG_ARRAY       If you can't take the address of the first of
-#                      a group of arguments and treat it as an array.
-#                      We always define this, because it's not a big loss
-#                      and can't be detected when cross-autoconfiguring.
-
-DEFS = @DEFS@ -DNO_ARG_ARRAY
+DEFS = @DEFS@ -DTERMCAP_FILE=\"$(termcapfile)\"
 
 CFLAGS = -g
 
-prefix = /usr/local
-exec_prefix = $(prefix)
+prefix = @prefix@
+exec_prefix = @exec_prefix@
 
 # Directory in which to install libtermcap.a.
 libdir = $(exec_prefix)/lib
@@ -57,6 +51,10 @@ oldincludedir = /usr/include
 # Directory in which to install the documentation info files.
 infodir = $(prefix)/info
 
+# File to which `install-data' should install the data file
+# if --enable-install-termcap was given.
+termcapfile = @termcapfile@
+
 #### End of system configuration section. ####
 
 SHELL = /bin/sh
@@ -65,35 +63,55 @@ SRCS = termcap.c tparam.c version.c
 OBJS = termcap.o tparam.o version.o
 HDRS = termcap.h
 DISTFILES = $(SRCS) $(HDRS) ChangeLog COPYING README INSTALL NEWS \
-termcap.texi termcap.info* \
-texinfo.tex Makefile.in configure configure.in
+termcap.src termcap.texi termcap.info* \
+texinfo.tex Makefile.in configure configure.in mkinstalldirs install-sh
 
-all:   libtermcap.a termcap.info
+all:   libtermcap.a info
 
 .c.o:
-       $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
+       $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
 
-install: all
+install: all installdirs @installdata@
        $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
-       -ranlib $(libdir)/libtermcap.a
-       test -d $(includedir) || mkdir $(includedir)
+       -$(RANLIB) $(libdir)/libtermcap.a
        cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
        -cd $(srcdir); test -z "$(oldincludedir)" || \
          $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
        cd $(srcdir); for f in termcap.info*; \
        do $(INSTALL_DATA) $$f $(infodir)/$$f; done
 
-uninstall:
+uninstall: @uninstalldata@
        rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
        test -z "$(oldincludedir)" || rm -f $(oldincludedir)/termcap.h
        rm -f $(infodir)/termcap.info*
 
+# These are separate targets to avoid trashing the user's existing
+# termcap file unexpectedly.
+install-data:
+       $(INSTALL_DATA) ${srcdir}/termcap.src ${termcapfile}
+
+uninstall-data:
+       rm -f ${termcapfile}
+
+installdirs:
+       $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) \
+       $(includedir) $(infodir)
+
+Makefile: Makefile.in config.status
+       $(SHELL) config.status
+config.status: configure
+       $(SHELL) config.status --recheck
+configure: configure.in
+       cd $(srcdir) && autoconf
+
 libtermcap.a: $(OBJS)
-       ar rc $@ $(OBJS)
-       -ranlib $@
+       $(AR) rc $@ $(OBJS)
+       -$(RANLIB) $@
+
+info: termcap.info
 
 termcap.info: termcap.texi
-       $(MAKEINFO) $(srcdir)/termcap.texi --output=$(srcdir)/termcap.info
+       $(MAKEINFO) $(srcdir)/termcap.texi --output=$@
 
 TAGS:  $(SRCS)
        etags $(SRCS)
@@ -104,9 +122,11 @@ clean:
 mostlyclean: clean
 
 distclean: clean
-       rm -f Makefile config.status
+       rm -f Makefile config.status config.cache config.log
 
-realclean: distclean
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "rebuilding the deleted files requires makeinfo."
        rm -f TAGS *.info*
 
 dist: $(DISTFILES)
@@ -114,5 +134,5 @@ dist: $(DISTFILES)
        rm -rf `cat .fname`
        mkdir `cat .fname`
        ln $(DISTFILES) `cat .fname`
-       tar chzf `cat .fname`.tar.z `cat .fname`
+       tar chzf `cat .fname`.tar.gz `cat .fname`
        rm -rf `cat .fname` .fname