diff options
author | 2012-08-28 12:19:56 -0400 | |
---|---|---|
committer | 2012-11-17 14:15:58 -0500 | |
commit | f2500f5954611d110ac18e9990f42d5a915f8101 (patch) | |
tree | bad7f65fb1340e65e45f13aabd7871d22f130aa6 /Makefile.am | |
parent | require at least automake 1.11.6 (diff) | |
download | sandbox-f2500f5954611d110ac18e9990f42d5a915f8101.tar.gz sandbox-f2500f5954611d110ac18e9990f42d5a915f8101.tar.bz2 sandbox-f2500f5954611d110ac18e9990f42d5a915f8101.zip |
add a configure option to control pch usage
Mostly for testing purposes. This also tweaks the dependency to fix a
warning when generating the headers.h.pch in subdirs when the toplevel
headers.h.pch already exists.
URL: http://bugs.gentoo.org/425524
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 475c8c0..eb54f42 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,9 +11,9 @@ SUBDIRS = \ src \ tests +noinst_LTLIBRARIES = + SANDBOX_PCH = headers.h.gch libsandbox/headers.h.gch libsbutil/headers.h.gch -BUILT_SOURCES = $(SANDBOX_PCH) -noinst_LTLIBRARIES = libpch.la nodist_libpch_la_SOURCES = $(SANDBOX_PCH) GCH_CP = ( \ src=`dirname $@`/.libs/`basename $@`.o; \ @@ -30,10 +30,23 @@ $(builddir)/libsandbox/headers.h.gch: headers.h $(builddir)/headers.h.gch: headers.h $(AM_V_GEN)$(COMPILE) -c -o $@.o $< && $(GCH_CP) -libsbutil: libsbutil/headers.h.gch -libsandbox: libsbutil libsandbox/headers.h.gch -src: libsbutil headers.h.gch -tests: src headers.h.gch +if SB_BUILD_PCH +BUILT_SOURCES = $(SANDBOX_PCH) +noinst_LTLIBRARIES += libpch.la + +LIBSBUTIL_PCH = libsbutil/headers.h.gch +LIBSANDBOX_PCH = libsandbox/headers.h.gch +TOP_PCH = headers.h.gch + +# Make sure we build the subdirs before the top so they don't +# try to use the top level headers.h.pch. +$(TOP_PCH): $(LIBSBUTIL_PCH) $(LIBSANDBOX_PCH) +endif + +libsbutil: $(LIBSBUTIL_PCH) +libsandbox: libsbutil $(LIBSANDBOX_PCH) +src: libsbutil $(TOP_PCH) +tests: src $(TOP_PCH) EXTRA_DIST = headers.h localdecls.h ChangeLog.0 |