Skip to content

Commit

Permalink
Use el.make
Browse files Browse the repository at this point in the history
  • Loading branch information
casch-at committed Feb 25, 2024
1 parent 17b34ce commit aa8c49a
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 25 deletions.
4 changes: 4 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")

(("nil-mode" . ((compile-command . "make -f el.make"))))
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
- uses: actions/checkout@v4

- name: Run tests
run: make all
run: make -f el.make all
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.elc
/org-journal-autoloads.el
*-autoloads.el
23 changes: 0 additions & 23 deletions Makefile

This file was deleted.

73 changes: 73 additions & 0 deletions el.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
##
# this file is part of el.make
#
# copyright: 2024- christian schwarzgruber ([email protected])
#
# version: 0.1.0
#
# source: https://github.com/casch-at/el.make
#
#
##
####
##
# el.make 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.
#
# el.make 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 el.make. if not, see <http://www.gnu.org/licenses/>.
##
####
##
# hier koennte ihre werbung stehen
#
# el.make
#
# an emacs lisp `make` file
##

# todo(cschwarzgruber): hmm?
export LC_ALL = C

emacs = emacs
flags = -Q --batch --no-site-file
batch = $(emacs) $(flags)

## test directory
test-d = tests

## source directory
src-d = src

## all source files
el-f = $(wildcard $(src-d)/*.el)

## all test files
test-f = $(wildcard $(test-d)/*.el)

## all compiled files
elc-f = $(addprefix $(src-d)/, $(notdir $(el-f:.el=.elc)))

.phony: all compile test clean

all: compile test

compile: $(elc-f)

test: $(elc-f)
@echo "running tests... "
@$(batch) -L $(src-d) -l $(test-f) -f ert-run-tests-batch-and-exit

$(src-d)/%.elc: $(src-d)/%.el
@echo "compiling $<..."
@$(batch) -f batch-byte-compile $<

clean:
rm -f $(elc-f)
File renamed without changes.

0 comments on commit aa8c49a

Please sign in to comment.