Skip to content

Commit

Permalink
Use makem.sh instead of CMake and custom Makefile
Browse files Browse the repository at this point in the history
Also use makem.sh's support for checkdoc, since the previously-used
checkdoc-batch URL is broken.
  • Loading branch information
bcc32 committed Jul 6, 2024
1 parent 7b2082d commit a889ddc
Show file tree
Hide file tree
Showing 6 changed files with 1,377 additions and 72 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
*.elc
*~
CMakeCache.txt
CMakeFiles/
/Makefile
cmake_install.cmake
59 changes: 0 additions & 59 deletions CMakeLists.txt

This file was deleted.

6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Tips for contributors
---------------------

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

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

**./makem.sh** and **./Makefile**: build scripts for linting and testing this
project, copied from [makem].

**./*.el**: the [Emacs] ledger-mode lisp code.

**./doc/**: documentation, and tools for generating documents such as the *pdf*
Expand All @@ -47,3 +50,4 @@ manual.
[Emacs]: http://www.gnu.org/software/emacs/
[GPLv2]: http://www.gnu.org/licenses/gpl-2.0.html
[github]: https://github.com/ledger/ledger-mode/
[makem]: https://github.com/alphapapa/makem.sh/
59 changes: 59 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# * makem.sh/Makefile --- Script to aid building and testing Emacs Lisp packages

# URL: https://github.com/alphapapa/makem.sh
# Version: 0.5

# * Arguments

# For consistency, we use only var=val options, not hyphen-prefixed options.

# NOTE: I don't like duplicating the arguments here and in makem.sh,
# but I haven't been able to find a way to pass arguments which
# conflict with Make's own arguments through Make to the script.
# Using -- doesn't seem to do it.

ifdef install-deps
INSTALL_DEPS = "--install-deps"
endif
ifdef install-linters
INSTALL_LINTERS = "--install-linters"
endif

ifdef sandbox
ifeq ($(sandbox), t)
SANDBOX = --sandbox
else
SANDBOX = --sandbox=$(sandbox)
endif
endif

ifdef debug
DEBUG = "--debug"
endif

# ** Verbosity

# Since the "-v" in "make -v" gets intercepted by Make itself, we have
# to use a variable.

verbose = $(v)

ifneq (,$(findstring vvv,$(verbose)))
VERBOSE = "-vvv"
else ifneq (,$(findstring vv,$(verbose)))
VERBOSE = "-vv"
else ifneq (,$(findstring v,$(verbose)))
VERBOSE = "-v"
endif

# * Rules

# TODO: Handle cases in which "test" or "tests" are called and a
# directory by that name exists, which can confuse Make.

%:
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS) $(@)

.DEFAULT: init
init:
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS)
Loading

0 comments on commit a889ddc

Please sign in to comment.