Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix dependencies on AIX #8285

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ uninstall:
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'

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/$(BUIDLTYPE)/node.exp
Copy link
Member

@bnoordhuis bnoordhuis Aug 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: s/BUIDLTYPE/BUILDTYPE/

EDIT: Also, please try to stay within 80 columns.

@if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs rm -rf; fi
-rm -rf node_modules
@if [ -d deps/icu ]; then echo deleting deps/icu; rm -rf deps/icu; fi
Expand Down Expand Up @@ -134,10 +134,17 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
--nodedir="$(shell pwd)"

# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
test/addons/.docbuildstamp: tools/doc/addon-verify.js doc/api/addons.md
ifeq ($(OSTYPE),aix)
test/addons/.docbuildstamp: tools/doc/addon-verify.js doc/api/addons.md out/Release/node.exp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking out a dependency on node.exp seems reasonable to me but:

  1. Don't indent the target name, and
  2. Don't duplicate the target logic, and
  3. Don't hard-code 'Release'.

You could write it like this:

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/??_*/
$(NODE) $<
touch $@
else
test/addons/.docbuildstamp: tools/doc/addon-verify.js doc/api/addons.md
$(RM) -r test/addons/??_*/
$(NODE) $<
touch $@
endif

ADDONS_BINDING_GYPS := \
$(filter-out test/addons/??_*/binding.gyp, \
Expand Down
1 change: 0 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@
},
{
'target_name': 'node_exp',
'process_outputs_as_sources': 1,
'type': 'none',
'dependencies': [
'<(node_core_target_name)',
Expand Down
6 changes: 4 additions & 2 deletions tools/create_expfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
echo "Searching $1 to write out expfile to $2"

# this special sequence must be at the start of the exp file
echo "#!." > $2
echo "#!." > $2.tmp

# pull the symbols from the .a files
find $1 -name "*.a" | grep -v gtest \
Expand All @@ -45,4 +45,6 @@ find $1 -name "*.a" | grep -v gtest \
if ((($2 == "T") || ($2 == "D") || ($2 == "B")) &&
(substr($3,1,1) != ".")) { print $3 }
}' \
| sort -u >> $2
| sort -u >> $2.tmp

mv -f $2.tmp $2