Bug 831552 - Install all SpiderMonkey headers when |make install| happens. The ones in INSTALLED_HEADERS have additional dependencies which must be copied into place as well for the whole thing to work correctly. r=jimb, r=ted

--HG--
extra : rebase_source : c98894717ab94044e800a73f3c91dec1129e3d5f
This commit is contained in:
Rico Tzschichholz 2013-01-17 01:07:01 +01:00
parent 4eb7a2418e
commit 420d55c0e7

View File

@ -841,9 +841,70 @@ js-config: js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config
SCRIPTS = js-config
SDK_BINARY = js-config
######################################################
# BEGIN SpiderMonkey header installation
#
# Mozilla/Gecko/Firefox mostly doesn't concern itself with defining a sensible
# install target, because it's shipping primarily packaged builds. And even if
# it did, those builds wouldn't really have reason to include header files. So
# we have to install public headers ourselves, rather than using something from
# config/rules.mk or similar.
#
# The overall directory structure of the installed headers looks like so:
#
# $(includedir)/
# $(MODULE)/
# jsapi.h, jspubtd.h, etc. (all of INSTALLED_HEADERS)
# js/
# js/public/* headers (all are public)
# ds/
# js/src/ds/* public headers
# gc/
# js/src/gc/* public headers
# mozilla/
# mfbt headers
#
# Currently $(MODULE) is just js, but we'll soon be changing it to include the
# SpiderMonkey version, so that headers for multiple SpiderMonkey installs can
# exist on a system at once. (This permits embedders depending on system
# SpiderMonkey to independently update their embeddings to newer SpiderMonkey
# releases at different paces.)
#
# It is expected that embedders will then add -I$(includedir)/$(MODULE) to
# their compiler invocations, which will then expose all of jsapi.h and friends
# as they've always been exported. (This will happen naturally for anyone using
# pkgconfig systems to determine compiler/linker flags and the like.) Headers
# in subdirectories will show up as "mozilla/Assertions.h" and so on. Also,
# this system keeps #include "js/CharacterEncoding.h" in internal headers
# working -- not that this is required, but it does simplify things. (At some
# point we may want to convert SpiderMonkey, and maybe Gecko, to this system, in
# the interest of being a more conventional embedder, but it's probably a ways
# off.)
#
# Eventually we'll probably trim this structure down to having the mfbt headers
# in mozilla/, and every SpiderMonkey-specific header in js/*. In the meantime
# this is the structure implemented below.
#
install:: $(INSTALLED_HEADERS)
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)
install:: $(EXPORTS_ds)
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
install:: $(EXPORTS_gc)
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
install:: $(EXPORTS_js)
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/js
install:: $(EXPORTS_mozilla)
$(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
#
# END SpiderMonkey header installation
#############################################
install:: $(SCRIPTS)
$(SYSINSTALL) $^ $(DESTDIR)$(bindir)