[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 4e4d8508cd 039/166: ENHANCED: Allow using swipl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 4e4d8508cd 039/166: ENHANCED: Allow using swipl compiled with GMP |
Date: |
Fri, 30 Sep 2022 04:59:24 -0400 (EDT) |
branch: elpa/sweeprolog
commit 4e4d8508cde67470ed8cc165499fd8302b70d737
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
ENHANCED: Allow using swipl compiled with GMP
---
.build.yml | 14 +++++++++++---
Makefile | 22 ++--------------------
sweep.c | 1 +
sweep.el | 4 ++--
4 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/.build.yml b/.build.yml
index bd049c2838..2f12efe469 100644
--- a/.build.yml
+++ b/.build.yml
@@ -33,11 +33,19 @@ secrets:
sources:
- git@git.sr.ht:~eshel/sweep
tasks:
- - build: |
- cd sweep
+ - getswipl: |
+ git clone --recursive https://github.com/SWI-Prolog/swipl-devel.git
+ cd swipl-devel
+ mkdir build
+ cd build
export LANG="en_US.UTF-8"
sudo localectl set-locale LANG=en_US.UTF-8
localectl set-locale LANG=en_US.UTF-8
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSWIPL_INSTALL_IN_LIB=ON
-DSWIPL_PACKAGES_ODBC=OFF -DSWIPL_PACKAGES_JAVA=OFF -DSWIPL_PACKAGES_X=OFF
-DINSTALL_DOCUMENTATION=OFF -G Ninja ..
+ ninja
+ ninja install
+ - build: |
+ cd sweep
make
make sweep.info
- LD_PRELOAD=lib/libswipl.so make check
+ make check
diff --git a/Makefile b/Makefile
index f5758a24be..687b1f51ca 100644
--- a/Makefile
+++ b/Makefile
@@ -15,45 +15,27 @@ OBJECT = $(BASENAME).o
SOURCE = $(BASENAME).c
LDFLAGS += -shared
-LDFLAGS += -Llib
LDFLAGS += -lswipl
CFLAGS += -fPIC
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -O2
-CFLAGS += -Ilib/swipl/include
-
-CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CURRENT_DIR)
-CMAKE_OPTIONS += -DUSE_GMP=OFF
-CMAKE_OPTIONS += -DSWIPL_PACKAGES_ODBC=OFF
-CMAKE_OPTIONS += -DSWIPL_PACKAGES_JAVA=OFF
-CMAKE_OPTIONS += -DSWIPL_PACKAGES_X=OFF
-CMAKE_OPTIONS += -DSWIPL_INSTALL_IN_LIB=ON
+CFLAGS += -I/usr/local/lib/swipl/include
.PHONY: clean all swipl check
all: $(TARGET)
-$(OBJECT): $(SOURCE) lib/libswipl.$(SOEXT)
+$(OBJECT): $(SOURCE)
$(CC) $(CFLAGS) -o $@ -c $(SOURCE)
$(TARGET): $(OBJECT)
$(CC) -o $@ $(OBJECT) $(LDFLAGS)
clean:
- rm -rf bin lib share swipl/build
rm -f $(TARGET) $(OBJECT) $(BASENAME).info
-lib/libswipl.$(SOEXT):
- cd swipl; \
- rm -rf build; \
- mkdir build; \
- cd build; \
- cmake $(CMAKE_OPTIONS) -G Ninja ..; \
- ninja; \
- ninja install
-
$(BASENAME).info:: README.org
emacs -Q --batch --eval '(require (quote ox-texinfo))' --eval
"(with-current-buffer (find-file \"README.org\") (org-export-to-file (quote
texinfo) \"$@\" nil nil nil nil nil (quote org-texinfo-compile)))"
diff --git a/sweep.c b/sweep.c
index 188ada6f55..12a559f525 100644
--- a/sweep.c
+++ b/sweep.c
@@ -426,6 +426,7 @@ sweep_initialize(emacs_env *env, ptrdiff_t nargs,
emacs_value *args, void *data)
return NULL;
}
}
+ PL_action(PL_GMP_SET_ALLOC_FUNCTIONS, FALSE);
r = PL_initialise(nargs, argv);
for (i = 0; i < nargs; i++) {
free(argv[i]);
diff --git a/sweep.el b/sweep.el
index 10e0059073..b43784e287 100644
--- a/sweep.el
+++ b/sweep.el
@@ -116,8 +116,8 @@
sweep-prolog-server-port))
(apply #'sweep-initialize
(cons (expand-file-name "bin/swipl" (file-name-directory
- load-file-name))
- (cons "-q" sweep-init-args)))
+ (buffer-file-name)))
+ (cons "-q" (cons "--no-signals" sweep-init-args))))
(sweep-start-prolog-server))
(defun sweep-predicates-collection ()
- [nongnu] elpa/sweeprolog 0aa0a46631 017/166: PORT: don't use clang's -fdiagnostics-absolute-paths, (continued)
- [nongnu] elpa/sweeprolog 0aa0a46631 017/166: PORT: don't use clang's -fdiagnostics-absolute-paths, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d4a501e9af 020/166: PORT: use rpath linker option, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b75179cc6e 022/166: Revert rpath tweaks, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 2f5dd9f13c 024/166: FIXED: Use more robust Prolog to C string conversion, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5f0f223318 023/166: Use LD_PRELOAD for testing, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ea04f467b9 027/166: ADDED: sweep-pack-install for interactively installing packs, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 25bda86c48 032/166: Use load-file-path instead of custom hack, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog c5b1504ca8 033/166: ADDED: sweep-top-level command and appropriate mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a06906287f 036/166: ADDED: sweep_funcall/2, 3 for calling Elisp functions from Prolog, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b23e9819b 038/166: DOC: Add Prolog initialization section to the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4e4d8508cd 039/166: ENHANCED: Allow using swipl compiled with GMP,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 4b4b28f15a 007/166: Add module descriptions to sweep-find-module annotation function, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0078ef8ff0 060/166: ENHANCED: syntax errors coloring, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog e38825d0e2 066/166: ENHANCED: use a distinct face for structured comments, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 84e6182685 077/166: FIXED: detect "|:" prompt in the top-level, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6e5c822fc8 116/166: ADDED: sweep-colourise-buffer-on-idle user option, on by default, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a7ce69558e 111/166: Makefile: Use "--batch" instead of "-batch" for consistency, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b54d23b8b 086/166: ENHANCED: apply an appropriate face to global predicate calls, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d9b8ffccda 107/166: ADDED: (sweep-mode-map): bind C-c C-o to sweep-find-file-at-point, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ecc36d67e1 089/166: FIXED: handle some missing color terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog f72ebe6d62 127/166: ENHANCHED: automatic syntax aware autoindentation in sweep-mode, ELPA Syncer, 2022/09/30