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
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)))"
return NULL;
}
}
+ PL_action(PL_GMP_SET_ALLOC_FUNCTIONS, FALSE);
r = PL_initialise(nargs, argv);
for (i = 0; i < nargs; i++) {
free(argv[i]);
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 ()