mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 463339: Have js/src use symlinks when installing in dist. r=bsmedberg
A directory's 'libs' target should create symlinks in the top-level dist/bin and dist/lib directories to the libraries (and any other generated files) in the build tree, so that when one has changed sources in $src/js/src, simply running 'make' in $obj/js/src and then re-running $obj/dist/bin/firefox will pick up the new libraries. The js/src/Makefile.in 'install' target has many double-colon rules with commands; we'd like to use these all in two circumstances: . For 'make install' in a stand-alone js/src build. Since we're following GNU behavior, this should copy the files it's installing. . For 'make libs' in an in-tree js/src build. To interact properly with the rest of the Mozilla build system, this should create symlinks as explained above. To accomplish this, we use plain old $(INSTALL) in all the install targets, have js/src/Makefile.in set NSDISTMODE to copy (to get the GNU behavior), and then have config/js/Makefile.in override that (to get the Mozilla in-tree behavior).
This commit is contained in:
parent
05138c0c30
commit
dba865e0ba
@ -55,10 +55,12 @@ include $(topsrcdir)/config/rules.mk
|
||||
# libdir, and includedir, so that the 'make install' will put things
|
||||
# mostly in the right places. The install-runtime-libs target takes
|
||||
# care of getting the needed libraries into the 'bin' directory as
|
||||
# well as the 'lib' directory.
|
||||
# well as the 'lib' directory. Setting JS_MOZ_INSTALL= ensures that
|
||||
# we get symlinks (the proper in-tree build behavior), not copies (the
|
||||
# default GNU behavior).
|
||||
export::
|
||||
$(MAKE) -C $(JS_OBJDIR) install
|
||||
$(MAKE) -C $(JS_OBJDIR) install-runtime-libs libdir=$(DIST)/bin
|
||||
$(MAKE) -C $(JS_OBJDIR) JS_MOZ_INSTALL=t install
|
||||
$(MAKE) -C $(JS_OBJDIR) JS_MOZ_INSTALL=t install-runtime-libs libdir=$(DIST)/bin
|
||||
$(INSTALL) $(IFLAGS2) $(JS_CONFIG) $(SDK_BIN_DIR)
|
||||
|
||||
check::
|
||||
|
@ -45,6 +45,13 @@ DIRS = config
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifndef JS_MOZ_INSTALL
|
||||
# This is the appropriate behavior for GNU-style 'make install'. For
|
||||
# Mozilla in-tree behavior, leaving NSDISTMODE unset is the right
|
||||
# thing; config/js/Makefile.in sets JS_MOZ_INSTALL in that case.
|
||||
NSDISTMODE = copy
|
||||
endif
|
||||
|
||||
MODULE = js
|
||||
LIBRARY_NAME = mozjs
|
||||
GRE_MODULE = 1
|
||||
@ -602,10 +609,10 @@ js-config: js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config
|
||||
SCRIPTS = js-config
|
||||
|
||||
install:: $(INSTALLED_HEADERS)
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(includedir)/$(MODULE)
|
||||
$(INSTALL) $(IFLAGS1) $^ $(includedir)/$(MODULE)
|
||||
|
||||
install:: $(SCRIPTS) $(PROGRAM)
|
||||
$(SYSINSTALL) $(IFLAGS2) $^ $(bindir)
|
||||
$(INSTALL) $(IFLAGS2) $^ $(bindir)
|
||||
|
||||
# The Mozilla top-level makefiles use install-runtime-libs directly to
|
||||
# place an additional copy of the libraries in the 'dist/bin'
|
||||
@ -613,13 +620,13 @@ install:: $(SCRIPTS) $(PROGRAM)
|
||||
install:: install-runtime-libs
|
||||
install-runtime-libs:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
|
||||
ifneq (,$(LIBRARY))
|
||||
$(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(libdir)
|
||||
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(libdir)
|
||||
endif
|
||||
ifneq (,$(SHARED_LIBRARY))
|
||||
$(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(libdir)
|
||||
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(libdir)
|
||||
endif
|
||||
ifneq (,$(IMPORT_LIBRARY))
|
||||
$(SYSINSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(libdir)
|
||||
$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(libdir)
|
||||
endif
|
||||
|
||||
# Extra dependancies and rules for auto-generated headers
|
||||
|
Loading…
x
Reference in New Issue
Block a user