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

Reduce tarball size, v2 #5695

Merged
merged 1 commit into from Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 22 additions & 4 deletions Makefile
Expand Up @@ -211,6 +211,8 @@ test-timers:
test-timers-clean:
$(MAKE) --directory=tools clean


ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
test-v8:
# note: performs full test unless QUICKCHECK is specified
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
Expand All @@ -234,6 +236,12 @@ test-v8-benchmarks:

test-v8-all: test-v8 test-v8-intl test-v8-benchmarks
# runs all v8 tests
else
test-v8 test-v8-intl test-v8-benchmarks test-v8-all:
@echo "Testing v8 is not available through the source tarball."
@echo "Use the git repo instead:" \
"$ git clone https://github.com/nodejs/node.git"
endif

apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
Expand Down Expand Up @@ -427,12 +435,15 @@ $(TARBALL): release-only $(NODE_EXE) doc
mkdir -p $(TARNAME)/doc/api
cp doc/node.1 $(TARNAME)/doc/node.1
cp -r out/doc/api/* $(TARNAME)/doc/api/
rm -rf $(TARNAME)/deps/v8/{test,samples,tools/profviz} # too big
rm -rf $(TARNAME)/deps/v8/{test,samples,tools/profviz,tools/run-tests.py}
rm -rf $(TARNAME)/doc/images # too big
rm -rf $(TARNAME)/deps/uv/{docs,samples,test}
rm -rf $(TARNAME)/deps/openssl/{doc,demos,test}
rm -rf $(TARNAME)/deps/openssl/openssl/{doc,demos,test}
rm -rf $(TARNAME)/deps/zlib/contrib # too big, unused
rm -rf $(TARNAME)/.github # github issue templates
rm -rf $(TARNAME)/.{editorconfig,git*,mailmap}
rm -rf $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc}
rm -rf $(TARNAME)/tools/{osx-*,license-builder.sh,cpplint.py}
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs rm
find $(TARNAME)/ -type l | xargs rm # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
rm -rf $(TARNAME)
Expand Down Expand Up @@ -583,7 +594,7 @@ bench-idle:

jslint:
$(NODE) tools/eslint/bin/eslint.js benchmark lib src test tools/doc \
tools/eslint-rules --rulesdir tools/eslint-rules
tools/eslint-rules --rulesdir tools/eslint-rules
Copy link
Contributor

Choose a reason for hiding this comment

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

@Trott I think you committed these leading spaces, which can be problematic in a Makefile, thought it seems it didn't matter here. This change here could've been avoided with a Editorconfig plugin in your editor 😉


CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_lttng.cc
Expand All @@ -610,7 +621,14 @@ CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \
cpplint:
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)

ifneq ("","$(wildcard tools/eslint/bin/eslint.js)")
lint: jslint cpplint
else
lint:
@echo "Linting is not available through the source tarball."
@echo "Use the git repo instead:" \
"$ git clone https://github.com/nodejs/node.git"
endif

.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
check uninstall install install-includes install-bin all staticlib \
Expand Down
6 changes: 6 additions & 0 deletions vcbuild.bat
Expand Up @@ -261,10 +261,16 @@ goto jslint

:jslint
if not defined jslint goto exit
if not exist tools\eslint\bin\eslint.js goto no-lint
echo running jslint
%config%\node tools\eslint\bin\eslint.js benchmark lib src test tools\doc tools\eslint-rules --rulesdir tools\eslint-rules
goto exit

:no-lint
echo Linting is not available through the source tarball.
echo Use the git repo instead: $ git clone https://github.com/nodejs/node.git
goto exit

:create-msvs-files-failed
echo Failed to create vc project files.
goto exit
Expand Down