Browse Source

build: fix dependencies on AIX

Addon tests were still starting to run before the node exp file
creation was complete.

- remove process_outputs_as_sources as it did not fix the
  problem
- update create_expfile.sh so that exp file is created in a
  temporary file and then renamed to final name so that
  file is only visible once it is complete
- update target used in building Addons so that for
  AIX it depends on the exp file being available

PR-URL: https://github.com/nodejs/node/pull/8285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
v7.x
Michael Dawson 8 years ago
parent
commit
1657f12f75
  1. 11
      Makefile
  2. 1
      node.gyp
  3. 6
      tools/create_expfile.sh

11
Makefile

@ -87,7 +87,8 @@ uninstall:
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
clean: clean:
-rm -rf out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) -rm -rf out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) \
out/$(BUILDTYPE)/node.exp
@if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs rm -rf; fi @if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs rm -rf; fi
-rm -rf node_modules -rm -rf node_modules
@if [ -d deps/icu ]; then echo deleting deps/icu; rm -rf deps/icu; fi @if [ -d deps/icu ]; then echo deleting deps/icu; rm -rf deps/icu; fi
@ -134,7 +135,13 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
--nodedir="$(shell pwd)" --nodedir="$(shell pwd)"
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
test/addons/.docbuildstamp: tools/doc/addon-verify.js doc/api/addons.md DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.js doc/api/addons.md
ifeq ($(OSTYPE),aix)
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
endif
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS)
$(RM) -r test/addons/??_*/ $(RM) -r test/addons/??_*/
$(NODE) $< $(NODE) $<
touch $@ touch $@

1
node.gyp

@ -906,7 +906,6 @@
}, },
{ {
'target_name': 'node_exp', 'target_name': 'node_exp',
'process_outputs_as_sources': 1,
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
'<(node_core_target_name)', '<(node_core_target_name)',

6
tools/create_expfile.sh

@ -36,7 +36,7 @@
echo "Searching $1 to write out expfile to $2" echo "Searching $1 to write out expfile to $2"
# this special sequence must be at the start of the exp file # this special sequence must be at the start of the exp file
echo "#!." > $2 echo "#!." > $2.tmp
# pull the symbols from the .a files # pull the symbols from the .a files
find $1 -name "*.a" | grep -v gtest \ find $1 -name "*.a" | grep -v gtest \
@ -45,4 +45,6 @@ find $1 -name "*.a" | grep -v gtest \
if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && if ((($2 == "T") || ($2 == "D") || ($2 == "B")) &&
(substr($3,1,1) != ".")) { print $3 } (substr($3,1,1) != ".")) { print $3 }
}' \ }' \
| sort -u >> $2 | sort -u >> $2.tmp
mv -f $2.tmp $2

Loading…
Cancel
Save