emacs-elpa-diffs
[Top][All Lists]
Advanced

[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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]