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 19, 2024
1 parent b154887 commit 6b3f376
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
- uses: actions/checkout@v4

- name: Run tests
run: make all
run: make -f el.make all
23 changes: 0 additions & 23 deletions Makefile

This file was deleted.

72 changes: 72 additions & 0 deletions el.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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
#
# a emacs lisp `make` file
##

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

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

## test directory
testdir = tests

## source directory
srcdir = src

## all source files
elfiles = $(wildcard $(srcdir)/*.el)

## all test files
testfiles = $(wildcard $(testdir)/*.el)

## all compiled files
elcfiles = $(addprefix $(srcdir)/, $(notdir $(elfiles:.el=.elc)))

.phony: all compile test clean

all: compile test

compile: $(elcfiles)

test: $(elcfiles)
@echo "running tests... "
@$(batch) -L $(srcdir) -l $(testfiles) -f ert-run-tests-batch-and-exit

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

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

0 comments on commit 6b3f376

Please sign in to comment.