adding githooks

This commit is contained in:
Alex Shinn 2020-07-28 15:59:24 +09:00
parent 648f615b77
commit 24c40099f0
2 changed files with 15 additions and 1 deletions

10
.githooks/update Executable file
View file

@ -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

View file

@ -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