diff --git a/Makefile b/Makefile index 065f488cc..be1fb6f08 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ MODULE_NAME := $(shell node -e "console.log(require('./package.json').binary.module_name)") +OS=$(shell uname | tr A-Z a-z) # Whether to turn compiler warnings into errors export WERROR ?= false @@ -11,11 +12,21 @@ default: release npm install --ignore-scripts release: ./node_modules/.bin/node-pre-gyp +ifeq ($(OS),darwin) + ./scripts/setup.sh --config local.env + . local.env; V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error +else V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error +endif @echo "run 'make clean' for full rebuild" debug: ./node_modules/.bin/node-pre-gyp +ifeq ($(OS),darwin) + ./scripts/setup.sh --config local.env + . local.env; V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error --debug +else V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error --debug +endif @echo "run 'make clean' for full rebuild" coverage: diff --git a/package.json b/package.json index 16a931d02..c327536de 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "font-inspect": "./bin/font-inspect" }, "scripts": { - "install": "node-pre-gyp install --fallback-to-build=true", + "install": "./scripts/setup.sh --config local.env; . local.env; node-pre-gyp install --fallback-to-build=true", "test": "./node_modules/.bin/tape test/**/*.test.js", "prepublishOnly": "npm ls" }, diff --git a/src/glyphs.cpp b/src/glyphs.cpp index b00b3d418..8847acf90 100644 --- a/src/glyphs.cpp +++ b/src/glyphs.cpp @@ -572,7 +572,7 @@ void RangeAsync(uv_work_t* req) { // direct type conversions, no need for checking or casting glyph_writer.add_uint32(3, glyph.width); glyph_writer.add_uint32(4, glyph.width); - glyph_writer.add_sint32(5, glyph.width); + glyph_writer.add_sint32(5, static_cast(glyph.width)); // conversions requiring checks, for safety and correctness