Skip to content

Commit

Permalink
try 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Dec 14, 2023
1 parent 179daa6 commit ecff6af
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,11 @@ binary: sqlite/emacsql-sqlite
sqlite/emacsql-sqlite:
$(MAKE) -C sqlite

# Emacs in GitHub Actions was built with nix; consequently, we must
# also utilize nix to build its modules. This ensures proper linking
# with the correct library paths.
.PHONY: ci-sqlite3-nix-fix
ci-sqlite3-nix-fix:

ifdef NIX_PATH
ci-sqlite3-nix-fix:
SQLITE3-EL-PATH = ../sqlite3/sqlite3.el
ifneq (,$(wildcard $(SQLITE3-EL-PATH)))
# try to change the sqlite3 build command based on past and present
# known patterns found in ../sqlite3/sqlite3.el ...
ci-sqlite3-nix-fix:
@echo patching $(SQLITE3-EL-PATH) to build with nix...
sed -i 's\("make" "all")\("nix-shell" "-p" "sqlite.dev" "--run" "make all")\g' $(SQLITE3-EL-PATH)
sed -i 's/"make all"/"nix-shell -p sqlite.dev --run \\"make all\\""/g' $(SQLITE3-EL-PATH)
endif
export SQLITE3_API_BUILD_COMMAND = 'nix-shell -p sqlite.dev --run "make all"'
endif

lisp: ci-sqlite3-nix-fix $(ELCS) loaddefs
lisp: $(ELCS) loaddefs
loaddefs: $(PKG)-autoloads.el

%.elc: %.el
Expand Down

0 comments on commit ecff6af

Please sign in to comment.