Skip to content

Commit e00951e

Browse files
committed
build: update Makefile so exp headersbuildstamp runs install.py to ensure exp is a prereq of the headers phase
Signed-off-by: Stewart X Addison <sxa@ibm.com>
1 parent 94a100c commit e00951e

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

‎Makefile‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,19 @@ ADDONS_HEADERS_PREREQS := tools/install.py \
434434
src/node_api_types.h src/node_buffer.h src/node_object_wrap.h \
435435
src/node_version.h
436436

437+
ifeq ($(OSTYPE),aix)
438+
ADDONS_HEADERS_PREREQS := $(ADDONS_HEADERS_PREREQS) out/$(BUILDTYPE)/node.exp
439+
endif
440+
ifeq ($(OSTYPE),os400)
441+
ADDONS_HEADERS_PREREQS := $(ADDONS_HEADERS_PREREQS) out/$(BUILDTYPE)/node.exp
442+
endif
443+
ifneq (,$(filter $(OSTYPE),aix os400))
444+
# Shared-library builds populate node.exp via generate_node_exp (node.gyp);
445+
# install.py and addon headers expect out/$(BUILDTYPE)/node.exp (not only libnode.exp).
446+
out/$(BUILDTYPE)/node.exp: config.gypi out/Makefile
447+
$(MAKE) -C out BUILDTYPE=$(BUILDTYPE) V=$(V) node
448+
endif
449+
437450
ADDONS_HEADERS_DIR = out/$(BUILDTYPE)/addons_headers
438451

439452
# Generate node headers which will be used for building addons.

‎node.gyp‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,12 @@
674674
'-Wl,-brtl',
675675
],
676676
}],
677+
['node_shared=="true" and OS in "aix os400"', {
678+
'dependencies': ['generate_node_exp'],
679+
'ldflags': [
680+
'-Wl,-bE:<(PRODUCT_DIR)/<(node_core_target_name).exp',
681+
],
682+
}],
677683
[ 'node_shared=="false"', {
678684
# Keep this whole-archive section in sync with the `node_lib` target below.
679685
'xcode_settings': {
@@ -1189,6 +1195,23 @@
11891195
}],
11901196
],
11911197
}],
1198+
['OS in "aix os400"', {
1199+
'conditions': [
1200+
['node_use_node_snapshot=="true"', {
1201+
'variables': {
1202+
'expfile_extra_inputs': [
1203+
'<(obj_dir)/<(node_lib_target_name)/gen/node_snapshot.o',
1204+
],
1205+
},
1206+
}, {
1207+
'variables': {
1208+
'expfile_extra_inputs': [
1209+
'<(obj_dir)/<(node_lib_target_name)/src/node_snapshot_stub.o',
1210+
],
1211+
},
1212+
}],
1213+
],
1214+
}],
11921215
[ 'node_shared=="true" and OS=="win"', {
11931216
'sources': [
11941217
'src/res/node.rc',

0 commit comments

Comments
 (0)