Work around gcc10 FAIL: S-records with constructors
[binutils-gdb.git] / readline / Makefile.in
index f4ed8110a29eafd0a30de937845e829b697ece9b..bcbd18b662ad77527a6ad7eaea22fba4fe29da33 100644 (file)
@@ -1,6 +1,6 @@
 ## -*- text -*- ##
 # Master Makefile for the GNU readline library.
-# Copyright (C) 1994-2009 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 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
@@ -26,6 +26,8 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+
 srcdir = @srcdir@
 VPATH = @srcdir@
 top_srcdir = @top_srcdir@
@@ -43,8 +45,6 @@ RM = rm -f
 CP = cp
 MV = mv
 
-PURIFY = @PURIFY@
-
 @SET_MAKE@
 SHELL = @MAKE_SHELL@
 
@@ -59,9 +59,12 @@ mandir = @mandir@
 includedir = @includedir@
 datadir = @datadir@
 localedir = @localedir@
+pkgconfigdir = ${libdir}/pkgconfig
 
 infodir = @infodir@
 
+docdir = @docdir@
+
 man3dir = $(mandir)/man3
 
 # Support an alternate destination root directory for package building
@@ -83,7 +86,7 @@ TERMCAP_LIB = @TERMCAP_LIB@
 # For libraries which include headers from other libraries.
 INCLUDES = -I. -I$(srcdir)
 
-XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES)
+XCCFLAGS = $(ASAN_CFLAGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
 CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
 
 # could add -Werror here
@@ -92,6 +95,11 @@ GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
                 -Wmissing-prototypes -Wno-implicit -pedantic
 GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@
 
+ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer
+ASAN_XLDFLAGS = -fsanitize=address
+
+install_examples = @EXAMPLES_INSTALL_TARGET@
+
 .c.o:
        ${RM} $@
        $(CC) -c $(CCFLAGS) $<
@@ -121,14 +129,17 @@ HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
           $(srcdir)/tilde.h $(srcdir)/rlconf.h $(srcdir)/rltty.h \
           $(srcdir)/ansi_stdlib.h $(srcdir)/tcap.h $(srcdir)/rlstdc.h \
           $(srcdir)/xmalloc.h $(srcdir)/rlprivate.h $(srcdir)/rlshell.h \
-          $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h
+          $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h \
+          $(srcdir)/colors.h $(srcdir)/parse-colors.h
 
 HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o
 TILDEOBJ = tilde.o
+COLORSOBJ = colors.o parse-colors.o
 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
          rltty.o complete.o bind.o isearch.o display.o signals.o \
          util.o kill.o undo.o macro.o input.o callback.o terminal.o \
-         text.o nls.o misc.o compat.o xfree.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
+         text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \
+         xmalloc.o xfree.o compat.o
 
 # The texinfo files which document this library.
 DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
@@ -138,12 +149,15 @@ DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
 
 CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
 CREATED_CONFIGURE = config.status config.h config.cache config.log \
-                   stamp-config stamp-h
+                   stamp-config stamp-h readline.pc
 CREATED_TAGS = TAGS tags
 
 INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
                    rlstdc.h rlconf.h rltypedefs.h
 
+OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
+OTHER_INSTALLED_DOCS = CHANGES INSTALL README
+
 ##########################################################################
 TARGETS = @STATIC_TARGET@ @SHARED_TARGET@
 INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@
@@ -152,6 +166,9 @@ all: $(TARGETS)
 
 everything: all examples
 
+asan:
+       ${MAKE} ${MFLAGS} ASAN_CFLAGS='${ASAN_XCFLAGS}' ASAN_LDFLAGS='${ASAN_XLDFLAGS}' everything
+
 static: $(STATIC_LIBS)
 
 libreadline.a: $(OBJECTS)
@@ -193,13 +210,13 @@ stamp-h: config.status $(srcdir)/config.h.in
        CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
        echo > $@
 
-#$(srcdir)/configure: $(srcdir)/configure.in   ## Comment-me-out in distribution
+#$(srcdir)/configure: $(srcdir)/configure.ac   ## Comment-me-out in distribution
 #      cd $(srcdir) && autoconf        ## Comment-me-out in distribution
 
 
 shared:        force
        -test -d shlib || mkdir shlib
-       -( cd shlib ; ${MAKE} ${MFLAGS} all )
+       ( cd shlib ; ${MAKE} ${MFLAGS} all )
 
 documentation: force
        -test -d doc || mkdir doc
@@ -234,7 +251,16 @@ uninstall-headers:
 
 maybe-uninstall-headers: uninstall-headers
 
-install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples
+install-pc: installdirs
+       -$(INSTALL_DATA) $(BUILD_DIR)/readline.pc $(DESTDIR)$(pkgconfigdir)/readline.pc
+
+uninstall-pc:
+       -test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \
+               ${RM} readline.pc
+
+maybe-uninstall-pc: uninstall-pc
+
+install-static: installdirs $(STATIC_LIBS) install-headers install-doc ${install_examples} install-pc
        -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
        $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
        -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
@@ -245,32 +271,35 @@ install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-e
 installdirs: $(srcdir)/support/mkinstalldirs
        -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
                $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
-               $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
+               $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) \
+               $(DESTDIR)$(pkgconfigdir)
 
-uninstall: uninstall-headers uninstall-doc uninstall-examples
+uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc
        -test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
                ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
        -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
-install-shared: installdirs install-headers shared install-doc
-       -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
+install-shared: installdirs install-headers shared install-doc install-pc
+       ( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
        
-uninstall-shared: maybe-uninstall-headers
+uninstall-shared: maybe-uninstall-headers maybe-uninstall-pc
        -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
-install-examples: installdirs install-headers shared
+install-examples: installdirs install-headers
        -( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
        
 uninstall-examples: maybe-uninstall-headers
        -( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
 
 install-doc:   installdirs
+       $(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
        -( if test -d doc ; then \
                cd doc && \
                ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
          fi )
 
 uninstall-doc:
+       -( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} )
        -( if test -d doc ; then \
                cd doc && \
                ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
@@ -285,23 +314,26 @@ tags:     force
 clean: force
        $(RM) $(OBJECTS) $(STATIC_LIBS)
        $(RM) readline readline.exe
-       -( cd shlib && $(MAKE) $(MFLAGS) $@ )
+       ( cd shlib && $(MAKE) $(MFLAGS) $@ )
        -( cd doc && $(MAKE) $(MFLAGS) $@ )
        -( cd examples && $(MAKE) $(MFLAGS) $@ )
 
 mostlyclean: clean
-       -( cd shlib && $(MAKE) $(MFLAGS) $@ )
+       ( cd shlib && $(MAKE) $(MFLAGS) $@ )
        -( cd doc && $(MAKE) $(MFLAGS) $@ )
        -( cd examples && $(MAKE) $(MFLAGS) $@ )
 
 distclean maintainer-clean: clean
-       -( cd shlib && $(MAKE) $(MFLAGS) $@ )
+       ( cd shlib && $(MAKE) $(MFLAGS) $@ )
        -( cd doc && $(MAKE) $(MFLAGS) $@ )
        -( cd examples && $(MAKE) $(MFLAGS) $@ )
        $(RM) Makefile
        $(RM) $(CREATED_CONFIGURE)
        $(RM) $(CREATED_TAGS)
 
+readline.pc:   config.status $(srcdir)/readline.pc.in
+       $(SHELL) config.status
+
 info dvi html pdf ps:
        -( cd doc && $(MAKE) $(MFLAGS) $@ )
 
@@ -332,7 +364,8 @@ bind.o: history.h
 callback.o: rlconf.h
 callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-compat.o: rlstdc.h
+compat.o: ${BUILD_DIR}/config.h
+compat.o: rlstdc.h rltypedefs.h
 complete.o: ansi_stdlib.h posixdir.h posixstat.h
 complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
@@ -393,6 +426,7 @@ readline.o: posixstat.h ansi_stdlib.h posixjmp.h
 rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 rltty.o: rltty.h
 rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+savestring.o: ${BUILD_DIR}/config.h
 search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 search.o: ansi_stdlib.h history.h rlstdc.h
@@ -422,10 +456,18 @@ vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
 vi_mode.o: history.h ansi_stdlib.h rlstdc.h
 xfree.o: ${BUILD_DIR}/config.h
-xfree.o: ansi_stdlib.h readline.h
+xfree.o: ansi_stdlib.h
 xmalloc.o: ${BUILD_DIR}/config.h
 xmalloc.o: ansi_stdlib.h
 
+colors.o: ${BUILD_DIR}/config.h colors.h
+colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+colors.o: rlconf.h  
+colors.o: ansi_stdlib.h posixstat.h
+parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h
+parse-colors.o: rldefs.h rlconf.h
+parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+
 bind.o: rlshell.h
 histfile.o: rlshell.h
 nls.o: rlshell.h
@@ -455,6 +497,8 @@ text.o: rlprivate.h
 undo.o: rlprivate.h
 util.o: rlprivate.h
 vi_mode.o: rlprivate.h
+colors.o: rlprivate.h
+parse-colors.o: rlprivate.h
 
 bind.o: xmalloc.h
 callback.o: xmalloc.h
@@ -483,6 +527,8 @@ util.o: xmalloc.h
 vi_mode.o: xmalloc.h
 xfree.o: xmalloc.h
 xmalloc.o: xmalloc.h
+colors.o: xmalloc.h
+parse-colors.o: xmalloc.h
 
 complete.o: rlmbutil.h
 display.o: rlmbutil.h
@@ -526,6 +572,9 @@ vi_mode.o: $(srcdir)/vi_mode.c
 xfree.o: $(srcdir)/xfree.c
 xmalloc.o: $(srcdir)/xmalloc.c
 
+colors.o: $(srcdir)/parse-colors.c
+parse-colors.o: $(srcdir)/parse-colors.c
+
 histexpand.o: $(srcdir)/histexpand.c
 histfile.o: $(srcdir)/histfile.c
 history.o: $(srcdir)/history.c