Skip to content

Commit 878e62f

Browse files
committed
Use makem.sh instead of CMake and custom Makefile
Also use makem.sh's support for checkdoc, since the previously-used checkdoc-batch URL is broken.
1 parent e8720ee commit 878e62f

File tree

6 files changed

+1377
-72
lines changed

6 files changed

+1377
-72
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
*.elc
22
*~
3-
CMakeCache.txt
4-
CMakeFiles/
5-
/Makefile
6-
cmake_install.cmake

CMakeLists.txt

Lines changed: 0 additions & 59 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Tips for contributors
22
---------------------
33

44
* In your local repository, ensure that everything compiles by **running
5-
`cmake . && make`** (this will launch byte compilation of lisp files and regression
5+
`make`** (this will launch byte compilation of lisp files and regression
66
tests).
77
* You are then ready to make a **pull request**. Please make pull requests
88
**against `master`**.
@@ -30,6 +30,9 @@ description on GitHub.
3030

3131
**./LICENSE.md**: the [GPLv2] license.
3232

33+
**./makem.sh** and **./Makefile**: build scripts for linting and testing this
34+
project, copied from [makem].
35+
3336
**./*.el**: the [Emacs] ledger-mode lisp code.
3437

3538
**./doc/**: documentation, and tools for generating documents such as the *pdf*
@@ -47,3 +50,4 @@ manual.
4750
[Emacs]: http://www.gnu.org/software/emacs/
4851
[GPLv2]: http://www.gnu.org/licenses/gpl-2.0.html
4952
[github]: https://github.com/ledger/ledger-mode/
53+
[makem]: https://github.com/alphapapa/makem.sh/

Makefile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# * makem.sh/Makefile --- Script to aid building and testing Emacs Lisp packages
2+
3+
# URL: https://github.com/alphapapa/makem.sh
4+
# Version: 0.5
5+
6+
# * Arguments
7+
8+
# For consistency, we use only var=val options, not hyphen-prefixed options.
9+
10+
# NOTE: I don't like duplicating the arguments here and in makem.sh,
11+
# but I haven't been able to find a way to pass arguments which
12+
# conflict with Make's own arguments through Make to the script.
13+
# Using -- doesn't seem to do it.
14+
15+
ifdef install-deps
16+
INSTALL_DEPS = "--install-deps"
17+
endif
18+
ifdef install-linters
19+
INSTALL_LINTERS = "--install-linters"
20+
endif
21+
22+
ifdef sandbox
23+
ifeq ($(sandbox), t)
24+
SANDBOX = --sandbox
25+
else
26+
SANDBOX = --sandbox=$(sandbox)
27+
endif
28+
endif
29+
30+
ifdef debug
31+
DEBUG = "--debug"
32+
endif
33+
34+
# ** Verbosity
35+
36+
# Since the "-v" in "make -v" gets intercepted by Make itself, we have
37+
# to use a variable.
38+
39+
verbose = $(v)
40+
41+
ifneq (,$(findstring vvv,$(verbose)))
42+
VERBOSE = "-vvv"
43+
else ifneq (,$(findstring vv,$(verbose)))
44+
VERBOSE = "-vv"
45+
else ifneq (,$(findstring v,$(verbose)))
46+
VERBOSE = "-v"
47+
endif
48+
49+
# * Rules
50+
51+
# TODO: Handle cases in which "test" or "tests" are called and a
52+
# directory by that name exists, which can confuse Make.
53+
54+
%:
55+
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS) $(@)
56+
57+
.DEFAULT: init
58+
init:
59+
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS)

0 commit comments

Comments
 (0)