-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
78 lines (67 loc) · 2.45 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright (C) 2019-2024 Serghei Iakovlev <gnu@serghei.pl>
#
# This file is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <https://www.gnu.org/licenses/>.
include default.mk
%.elc: %.el
@printf "Compiling $<\n"
@$(RUNEMACS) --eval '(setq byte-compile-error-on-warn nil)' \
-f batch-byte-compile $<
.PHONY: clean
clean:
$(RM) *.elc
$(RM) test/*.elc
.PHONY: distclean
distclean: clean
$(RM) GPATH GRTAGS GTAGS
$(RM) package-quickstart.el
$(RM) -r elpa
.PHONY: install
install: init.el
$(RUNEMACS) --load $(TOP)/$<
.PHONY: checkdoc
checkdoc:
@for f in $(SRCS) ; do \
echo "Checking documentation for$$f ..."; \
$(EMACSBATCH) --eval "(checkdoc-file \"$$f\")"; \
done && echo "Done."
@echo ""
.PHONY: checkstyle
checkstyle: test/passive-voice-check.el
$(RUNEMACS) --load $(TOP)/$<
.PHONY: checkstartup
checkstartup: $(SRCS)
$(RUNEMACS) --eval '(progn (defvar url-show-status) (let ((debug-on-error t) (url-show-status nil) (user-emacs-directory default-directory) (user-init-file (expand-file-name "init.el"))(load-path (delq default-directory load-path))) (setq package-check-signature nil) (load-file user-init-file) (run-hooks (quote after-init-hook))))'
@echo "Startup successful"
@echo ""
.PHONY: test
test: checkstartup checkdoc checkstyle
.PHONY: help
help:
@echo ''
@echo 'Run "make install" first to install dependencies.'
@echo ''
@echo 'Available targets:'
@echo ' help: Show this help and exit'
@echo ' install: Install dependencies'
@echo ' checkdoc: Check doc for errors'
@echo ' checkstyle: Check for passive voice in documentation'
@echo ' checkstartup: Run Emacs startup to validate configuration and hooks'
@echo ' test: Run checks for startup, documentation, and style compliance'
@echo ' clean: Remove byte compiled files and artifacts'
@echo ''
# Local Variables:
# fill-column: 80
# mode: makefile-gmake
# coding: utf-8-unix
# End: