1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# -*- mode: makefile -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#
# Copyright (c) 2014, Joyent, Inc.
#
#
# Makefile.node.targ: See Makefile.node.defs.
#
# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
# into other repos as-is without requiring any modifications. If you find
# yourself changing this file, you should instead update the original copy in
# eng.git and then update your repo to use the new version.
#
ifneq ($(shell uname -s),SunOS)
NODE_PREBUILT_VERSION ?= $(error You must define NODE_PREBUILT_VERSION to use Makefile.node.targ on non-SunOS)
endif
ifeq ($(shell uname -s),SunOS)
$(NODE_EXEC) $(NPM_EXEC) $(NODE_WAF_EXEC): | deps/node/.git
(cd deps/node; ./configure $(NODE_CONFIG_FLAGS) && $(MAKE) && $(MAKE) install)
else
$(NODE_EXEC) $(NPM_EXEC) $(NODE_WAF_EXEC):
(mkdir -p $(BUILD) \
&& cd $(BUILD) \
&& [[ -d src-node ]] && (cd src-node && git checkout master && git pull) || git clone https://github.com/joyent/node.git src-node \
&& cd src-node \
&& git checkout $(NODE_PREBUILT_VERSION) \
&& ./configure $(NODE_CONFIG_FLAGS) \
&& $(MAKE) && $(MAKE) install)
endif
DISTCLEAN_FILES += $(NODE_INSTALL) $(BUILD)/src-node
distclean::
-([[ ! -d deps/node ]] || (cd deps/node && $(MAKE) distclean))
|