Add warnings when compiling

They help catch some easy to overlook mistakes.
This commit is contained in:
Tom Willemse 2013-06-08 01:05:23 +02:00
parent 39b5431da1
commit 87a300c389

View file

@ -8,13 +8,16 @@ objects = config.scm config.go git.scm git.go ui.scm ui.go main.scm \
install-objects = $(addprefix install-,$(objects)) install-objects = $(addprefix install-,$(objects))
uninstall-objects = $(addprefix uninstall-,$(objects)) uninstall-objects = $(addprefix uninstall-,$(objects))
warnings = unused-variable unused-toplevel unbound-variable \
arity-mismatch duplicate-case-datum bad-case-datum format
.PHONY: all install $(install-objects) uninstall $(uninstall-objects) \ .PHONY: all install $(install-objects) uninstall $(uninstall-objects) \
clean clean
all: $(filter %.go,$(objects)) all: $(filter %.go,$(objects))
$(filter %.go,$(objects)): %.go: %.scm $(filter %.go,$(objects)): %.go: %.scm
../env guild compile -o $@ $^ ../env guild compile $(addprefix -W ,$(warnings)) -o $@ $^
install: $(install-objects) install: $(install-objects)
uninstall: $(uninstall-objects) uninstall: $(uninstall-objects)