[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql e8c090e11f 353/427: Improve Makefile portability a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql e8c090e11f 353/427: Improve Makefile portability and dump Cask |
Date: |
Tue, 13 Dec 2022 03:00:01 -0500 (EST) |
branch: elpa/emacsql
commit e8c090e11f9e3be7fd9aa24159abe5082c8a73cb
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Improve Makefile portability and dump Cask
---
Makefile | 24 +++++++++++++++---------
sqlite/Makefile | 29 ++++++++++-------------------
2 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/Makefile b/Makefile
index 2341f0b409..c8eb4c9d1c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,18 @@
+# Clone the two dependencies of this package in sibling directories:
+# $ cd ..
+# $ git clone https://github.com/cbbrowne/pg.el pg
+# $ git clone https://github.com/skeeto/elisp-finalize finalize
+# $ cd -
+# $ make
+#
+# Or set LDFLAGS to point at these packages elsewhere:
+# $ make LDFLAGS='-L path/to/finalize -L path/to/pg'
+
+.POSIX:
+.SUFFIXES: .el .elc
EMACS = emacs
-CASK = cask
-BATCH = $(CASK) exec $(EMACS) -batch -Q -L . -L tests
+LDFLAGS = -L ../finalize -L ../pg
+BATCH = $(EMACS) -batch -Q -L . -L tests $(LDFLAGS)
EL = emacsql-compiler.el \
emacsql-system.el \
@@ -19,14 +31,10 @@ EXTRA_DIST = README.md UNLICENSE
all: test
-.cask: Cask
- cask install
- touch .cask
-
binary:
$(MAKE) -C sqlite
-compile: .cask $(ELC)
+compile: $(ELC)
package: emacsql-$(VERSION).tar
@@ -40,7 +48,5 @@ distclean: clean
rm -f bin/*
$(MAKE) -C sqlite clean
-.SUFFIXES: .el .elc
-
.el.elc:
$(BATCH) -f batch-byte-compile $<
diff --git a/sqlite/Makefile b/sqlite/Makefile
index 75a3002c8c..0d16da08a9 100644
--- a/sqlite/Makefile
+++ b/sqlite/Makefile
@@ -1,31 +1,22 @@
+.POSIX:
EMACS = emacs
+BINARY = emacsql-sqlite
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
- BINARY := $(BINARY).exe
-else
- ## Unix-like
- LDLIBS = -ldl
-endif
-
-CFLAGS = -O2 -W -Wall -Wextra \
+SUFFIX = $$($(EMACS) -Q -batch $(GETTUPLE))
+LDLIBS = -ldl
+CFLAGS = -O2 -W -Wall -Wextra \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FOREIGN_KEYS=1 \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_SOUNDEX
-install: ../bin/$(BINARY)
+emacsql-sqlite: emacsql.c sqlite3.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ emacsql.c sqlite3.c $(LDLIBS)
-../bin/$(BINARY): $(BINARY)
+install: emacsql-sqlite
mkdir -p ../bin/
- cp $< ../bin/
-
-$(BINARY): emacsql.o sqlite3.o
- $(CC) $(LDLIBS) $(LDFLAGS) -o $@ $^
+ cp emacsql-sqlite ../bin/emacsql-sqlite-$(SUFFIX)
clean:
- rm -f *.o $(BINARY) emacsql-sqlite-* ../bin/$(BINARY)
+ rm -f emacsql-sqlite ../bin/emacsql-sqlite-$(SUFFIX)
- [nongnu] elpa/emacsql 7b505b6e94 309/427: Update back-end documentation., (continued)
- [nongnu] elpa/emacsql 7b505b6e94 309/427: Update back-end documentation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 649fc6b0b4 312/427: Add emacsql-pg using pg.el as a back-end., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4a535e2cca 318/427: Fix typo in emacsql-buffer's doc-string, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a5a0c2f838 323/427: Fix typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e6ce8ded45 326/427: Require url when running emacsql-sqlite-download, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 01f3d3eb2b 316/427: Fallback to buffer-file-name when load-file-name is nil, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 02acd07072 328/427: Ensure executable variable is defined at compile time., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2ffcc95c67 338/427: Fix a typo in the doc-string of emacsql-with-params., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 74bd11bc09 334/427: Fix up package description headers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5df2891557 349/427: Use cl-generic package, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e8c090e11f 353/427: Improve Makefile portability and dump Cask,
ELPA Syncer <=
- [nongnu] elpa/emacsql 0ba12b89d5 084/427: Drop "work in progress.", ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 364bf466ea 086/427: Linkify the issue in the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql dd3f153406 089/427: Drop old with-errors macro., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 72c1954517 096/427: Block on connection until the output has flushed., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1e9857ccc4 103/427: Allow variables inside vectors., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8a66563af6 105/427: Combine :insert and :into., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d04ef64ce0 109/427: Add IF NOT EXISTS and TEMPORARY to CREATE TABLE., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 58641b9827 115/427: Fill out keywords in README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql fc941d7c75 118/427: Capture a common identifier vector pattern., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a09911a205 125/427: Add LIMIT and OFFSET expanders., ELPA Syncer, 2022/12/13