diff --git a/.githooks/update b/.githooks/update new file mode 100755 index 00000000..2a0dbca1 --- /dev/null +++ b/.githooks/update @@ -0,0 +1,10 @@ +#!/bin/sh + +old="$2" +new="$3" + +# fail if we add any new lines to C or Scheme source containing a tab +git diff --name-only "$old" "$new" |\ + egrep '\.(cpp|h|scm|sld|stub)$' |\ + xargs -d'\n' git diff -U0 "$old" "$new" -- |\ + grep -q $'^+.*\t' && exit 1 diff --git a/Makefile b/Makefile index be2412ba..da5a563a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # -*- makefile-gmake -*- -.PHONY: dist mips-dist cleaner test test-all test-dist checkdefs debian snowballs +.PHONY: dist mips-dist cleaner test test-all test-dist checkdefs debian snowballs init-dev .DEFAULT_GOAL := all CHIBI_VERSION ?= $(shell cat VERSION) @@ -69,6 +69,10 @@ include Makefile.libs all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES) +# Please run this if you want to contribute. +init-dev: + git config core.hooksPath .githooks + js: js/chibi.js js/chibi.js: chibi-scheme-emscripten chibi-scheme-static.bc js/pre.js js/post.js js/exported_functions.json