[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 1b37570bf5 352/427: Fix up the Makefile.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 1b37570bf5 352/427: Fix up the Makefile. |
Date: |
Tue, 13 Dec 2022 03:00:01 -0500 (EST) |
branch: elpa/emacsql
commit 1b37570bf5813e160fa18a766e20dfa690910519
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Fix up the Makefile.
---
Makefile | 59 +++++++++++++++++++++++++++------------------------------
sqlite/Makefile | 32 +++++++++++++++----------------
2 files changed, 43 insertions(+), 48 deletions(-)
diff --git a/Makefile b/Makefile
index 58e39ff9b6..2341f0b409 100644
--- a/Makefile
+++ b/Makefile
@@ -1,49 +1,46 @@
-EMACS ?= emacs
-CASK ?= cask
-VIRTUAL := $(CASK) exec $(EMACS)
-BATCH := $(VIRTUAL) -batch -Q -L . -L tests
-
-PACKAGE := emacsql
-VERSION := $(shell $(CASK) version)
-
-EL = emacsql-compiler.el emacsql-system.el emacsql.el \
- emacsql-sqlite.el emacsql-psql.el emacsql-mysql.el emacsql-pg.el
+EMACS = emacs
+CASK = cask
+BATCH = $(CASK) exec $(EMACS) -batch -Q -L . -L tests
+
+EL = emacsql-compiler.el \
+ emacsql-system.el \
+ emacsql.el \
+ emacsql-sqlite.el \
+ emacsql-psql.el \
+ emacsql-mysql.el \
+ emacsql-pg.el
ELC = $(EL:.el=.elc)
-EXTRA_DIST = README.md UNLICENSE
-
-TEST_EL = $(wildcard tests/*.el)
+TEST_EL = \
+ tests/emacsql-compiler-tests.el \
+ tests/emacsql-external-tests.el \
+ tests/emacsql-tests.el
TEST_ELC = $(TEST_EL:.el=.elc)
+EXTRA_DIST = README.md UNLICENSE
-.PHONY : all binary compile package test clean distclean
-
-all : test
+all: test
-.cask : Cask
+.cask: Cask
cask install
touch .cask
-binary :
+binary:
$(MAKE) -C sqlite
compile: .cask $(ELC)
-package : $(PACKAGE)-$(VERSION).tar
-
-$(PACKAGE)-pkg.el : Cask
- $(CASK) package
-
-$(PACKAGE)-$(VERSION).tar : $(PACKAGE)-pkg.el $(EL) sqlite/ $(EXTRA_DIST)
- tar -cf $@ --transform "s,^,$(PACKAGE)-$(VERSION)/," $^
+package: emacsql-$(VERSION).tar
test: compile $(TEST_ELC)
- $(BATCH) -l tests/$(PACKAGE)-tests.elc -f ert-run-tests-batch
+ $(BATCH) -l tests/emacsql-tests.elc -f ert-run-tests-batch
-clean :
- $(RM) *.tar *.elc tests/*.elc $(PACKAGE)-pkg.el
+clean:
+ rm -f $(ELC) $(TEST_ELC)
-distclean : clean
- $(RM) bin/*
+distclean: clean
+ rm -f bin/*
$(MAKE) -C sqlite clean
-%.elc : %.el
+.SUFFIXES: .el .elc
+
+.el.elc:
$(BATCH) -f batch-byte-compile $<
diff --git a/sqlite/Makefile b/sqlite/Makefile
index b44ab83d7d..75a3002c8c 100644
--- a/sqlite/Makefile
+++ b/sqlite/Makefile
@@ -1,7 +1,7 @@
-EMACS ?= emacs
-GETTUPLE = -l ../emacsql-system.el -f emacsql-system-print-tuple
-OSTUPLE ?= $(shell $(EMACS) -Q -batch $(GETTUPLE))
-BINARY = emacsql-sqlite-$(OSTUPLE)
+EMACS = emacs
+GETTUPLE = -l ../emacsql-system.el -f emacsql-system-print-tuple
+OSTUPLE = $(shell $(EMACS) -Q -batch $(GETTUPLE))
+BINARY = emacsql-sqlite-$(OSTUPLE)
ifneq (,$(findstring windows, $(OSTUPLE)))
## Windows
@@ -11,23 +11,21 @@ else
LDLIBS = -ldl
endif
-CFLAGS = -O2 -W -Wall -Wextra
-CFLAGS += -DSQLITE_THREADSAFE=0
-CFLAGS += -DSQLITE_DEFAULT_FOREIGN_KEYS=1
-CFLAGS += -DSQLITE_ENABLE_FTS4
-CFLAGS += -DSQLITE_ENABLE_FTS3_PARENTHESIS
-CFLAGS += -DSQLITE_SOUNDEX
+CFLAGS = -O2 -W -Wall -Wextra \
+ -DSQLITE_THREADSAFE=0 \
+ -DSQLITE_DEFAULT_FOREIGN_KEYS=1 \
+ -DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_FTS3_PARENTHESIS \
+ -DSQLITE_SOUNDEX
-.PHONY : clean install
+install: ../bin/$(BINARY)
-install : ../bin/$(BINARY)
-
-../bin/$(BINARY) : $(BINARY)
+../bin/$(BINARY): $(BINARY)
mkdir -p ../bin/
cp $< ../bin/
-$(BINARY) : emacsql.o sqlite3.o
+$(BINARY): emacsql.o sqlite3.o
$(CC) $(LDLIBS) $(LDFLAGS) -o $@ $^
-clean :
- $(RM) *.o $(BINARY) emacsql-sqlite-* ../bin/$(BINARY)
+clean:
+ rm -f *.o $(BINARY) emacsql-sqlite-* ../bin/$(BINARY)
- [nongnu] elpa/emacsql 67ca8124bc 425/427: make: Suppress warning about obsolete autoload package, (continued)
- [nongnu] elpa/emacsql 67ca8124bc 425/427: make: Suppress warning about obsolete autoload package, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e318a6c8f6 426/427: Add new SQLite back-ends, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9f0a19280c 296/427: Enhance emacsql-with-transaction to retry., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 616dde3752 361/427: An identifier named * means select all columns (#19), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5da614bc9b 359/427: Drop finalizer use and explicitely depend on Emacs 25, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3b70e8f5dd 366/427: Add support for NUL characters in strings (fixes #42), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 75ac0448a5 364/427: Add support for DISTINCT in aggregate functions (#41), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8c46fb2c1e 286/427: Drop argument count check since it's wrong., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 641338533c 331/427: Just build SQLite on first connection., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 56a2882936 333/427: Update README for Melpa changes., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1b37570bf5 352/427: Fix up the Makefile.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 2e9e2d6ba1 390/427: Fix SQL truncated when print-level or print-length are changed, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50b139443b 414/427: make: Fix compiling and cleaning tests, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4fe4413994 420/427: Re-indent some data so that machine and human can agree, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 62d3915737 363/427: Update to SQLite 3.22.0 and remove download system (#40), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a164ecd9d3 374/427: Implement operator precedence handling, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 214b46f547 372/427: Update documentation for building SQLite backend (#46), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5f30787890 375/427: Add precedence handling for "between" syntax, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 60b99760c5 371/427: Extend the compiler search to a configurable list (#45), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 373975cbcc 387/427: Remove types from cl-defgeneric arguments, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9dca599616 383/427: Fix whitespace, ELPA Syncer, 2022/12/13