File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -42,25 +42,30 @@ DIST_TGZ = haskell-mode-$(GIT_VERSION).tar.gz
42
42
43
43
PKG_DIST_FILES = $(ELFILES ) logo.svg
44
44
PKG_TAR = haskell-mode-$(VERSION ) .tar
45
+ ELCHECKS =$(addprefix check-, $(ELFILES:.el= ) )
45
46
46
47
% .elc : % .el
47
48
@$(BATCH ) \
48
49
--eval " (byte-compile-disable-warning 'cl-functions)" \
49
50
-f batch-byte-compile $<
50
51
51
- .PHONY : all compile info dist clean test elpa package
52
+ .PHONY : all compile info dist clean check $( ELCHECKS ) elpa package
52
53
53
54
all : compile $(AUTOLOADS )
54
55
55
56
compile : $(ELCFILES )
56
57
57
- check :
58
- $(BATCH ) \
59
- --eval "(setq byte-compile-error-on-warn t)" \
60
- --eval "(byte-compile-disable-warning 'cl-functions)" \
61
- -f batch-byte-compile $(ELFILES)
62
- @$(RM) $(ELCFILES)
63
- $(BATCH) --eval '(when (check-declare-directory ".") (error "check-declare failed"))'
58
+ $(ELCHECKS ) : check-% : % .el
59
+ @$(BATCH ) --eval ' (when (check-declare-file "$*.el") (error "check-declare failed"))'
60
+ @$(BATCH ) \
61
+ --eval " (setq byte-compile-error-on-warn t)" \
62
+ --eval " (byte-compile-disable-warning 'cl-functions)" \
63
+ -f batch-byte-compile $* .el
64
+ @$(RM ) $* .elc
65
+ @echo " --"
66
+
67
+ check : $(ELCHECKS )
68
+ @echo " checks passed!"
64
69
65
70
clean :
66
71
$(RM ) $(ELCFILES ) $(AUTOLOADS ) $(AUTOLOADS:.el=.elc ) $(DIST_TGZ ) $(PKG_TAR )
You can’t perform that action at this time.
0 commit comments