bfd: install plugin-api.h as needed
authorMike Frysinger <vapier@gentoo.org>
Sat, 4 Dec 2010 13:00:35 +0000 (13:00 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 4 Dec 2010 13:00:35 +0000 (13:00 +0000)
Since people need plugin-api.h in order to build linker plugins, install
the header with the other library headers when plugin support is enabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in

index ca8f6cb..16f5536 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-04  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing.
+       (PLUGINS/bfdinclude_HEADERS): Append plugin-api.h.
+       * Makefile.in: Regenerated.
+
 2010-12-04  Alan Modra  <amodra@gmail.com>
 
        PR ld/12277
index da14d57..9c454cc 100644 (file)
@@ -23,6 +23,7 @@ else !INSTALL_LIBBFD
 # Empty these so that the respective installation directories will not be created.
 bfdlibdir =
 bfdincludedir =
+bfdinclude_HEADERS =
 rpath_bfdlibdir = @bfdlibdir@
 noinst_LTLIBRARIES = libbfd.la
 libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
@@ -33,6 +34,7 @@ NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS)
 AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
 if PLUGINS
+bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
 LIBDL = -ldl
 endif
 
index c452dd7..2cbf6a0 100644 (file)
@@ -38,6 +38,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 @INSTALL_LIBBFD_FALSE@am__append_1 = -rpath $(rpath_bfdlibdir)
+@PLUGINS_TRUE@am__append_2 = $(INCDIR)/plugin-api.h
 subdir = .
 DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -136,8 +137,8 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-recursive uninstall-recursive
-am__bfdinclude_HEADERS_DIST = bfd.h $(INCDIR)/ansidecl.h \
-       $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
+am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
+       $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
 HEADERS = $(bfdinclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
@@ -327,7 +328,10 @@ bfddocdir = doc
 libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \
        @SHARED_LDFLAGS@ $(am__empty)
 @INSTALL_LIBBFD_TRUE@bfdlib_LTLIBRARIES = libbfd.la
-@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
+@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
+@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
+@INSTALL_LIBBFD_TRUE@  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+@INSTALL_LIBBFD_TRUE@  $(INCDIR)/bfdlink.h $(am__append_2)
 @INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
 @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
 AM_CFLAGS = $(WARN_CFLAGS)