[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 72cc4d516b 014/166: PORT: detect linux vs macOS
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 72cc4d516b 014/166: PORT: detect linux vs macOS shared object extension in Makefile |
Date: |
Fri, 30 Sep 2022 04:59:22 -0400 (EDT) |
branch: elpa/sweeprolog
commit 72cc4d516b3ee2b5f9bcae67e0eaea3b794d88f9
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
PORT: detect linux vs macOS shared object extension in Makefile
---
.build.yml | 38 ++++++++++++++++++++++++++++++++++++++
.gitignore | 1 +
Makefile | 23 ++++++++++++++++++-----
3 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/.build.yml b/.build.yml
new file mode 100644
index 0000000000..c52b2d355b
--- /dev/null
+++ b/.build.yml
@@ -0,0 +1,38 @@
+image: debian/stable
+packages:
+ - build-essential
+ - cmake
+ - ninja-build
+ - pkg-config
+ - ncurses-dev
+ - libreadline-dev
+ - libedit-dev
+ - libgoogle-perftools-dev
+ - libgmp-dev
+ - libssl-dev
+ - unixodbc-dev
+ - zlib1g-dev
+ - libarchive-dev
+ - libossp-uuid-dev
+ - libxext-dev
+ - libice-dev
+ - libjpeg-dev
+ - libxinerama-dev
+ - libxft-dev
+ - libxpm-dev
+ - libxt-dev
+ - libdb-dev
+ - libpcre2-dev
+ - libyaml-dev
+ - zip
+ - git
+secrets:
+ - 750079bb-9735-473b-bebf-db897c9f0c6b
+ - 72d5c3dc-f83f-4cc2-96e3-b2b08f6ee8a0
+sources:
+ - git@git.sr.ht:~eshel/sweep
+tasks:
+ - build: |
+ cd sweep
+ make
+ make info
diff --git a/.gitignore b/.gitignore
index 4cd36b432c..9f56ac134b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/sweep.info
/sweep.info~
/sweep.texi
+/sweep.o
diff --git a/Makefile b/Makefile
index e8d61133e0..6704c7d357 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,19 @@
CURRENT_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
BASENAME = sweep
+
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Linux)
+ SOEXT = so
+endif
+ifeq ($(UNAME_S),Darwin)
+ SOEXT = dylib
+endif
+
SOEXT = dylib
TARGET = $(BASENAME)-module.$(SOEXT)
+OBJECT = $(BASENAME).o
SOURCE = $(BASENAME).c
LDFLAGS += -shared
@@ -28,14 +38,17 @@ CMAKE_OPTIONS += -DSWIPL_INSTALL_IN_LIB=ON
all: $(TARGET)
-$(TARGET): $(SOURCE) swipl
- $(CC) $(CFLAGS) -o $@ $(SOURCE) $(LDFLAGS)
+$(OBJECT): $(SOURCE) lib/libswipl.$(SOEXT)
+ $(CC) $(CFLAGS) -o $@ -c $(SOURCE)
+
+$(TARGET): $(OBJECT)
+ $(CC) -o $@ $(OBJECT) $(LDFLAGS)
clean:
rm -rf bin lib share swipl/build
- rm -f $(TARGET) $(BASENAME).info
+ rm -f $(TARGET) $(OBJECT) $(BASENAME).info
-swipl:
+lib/libswipl.$(SOEXT):
cd swipl; \
rm -rf build; \
mkdir build; \
@@ -44,5 +57,5 @@ swipl:
ninja; \
ninja install
-$(BASENAME).info:
+$(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)))"
- [nongnu] elpa/sweeprolog 7085c2e830 142/166: ADDED: sweep-mode: make sexp-based commands work on Prolog terms, (continued)
- [nongnu] elpa/sweeprolog 7085c2e830 142/166: ADDED: sweep-mode: make sexp-based commands work on Prolog terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6434715829 149/166: FIXED: use a more robust mechanism for finding sweep-module, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 69be982c41 150/166: FIXED: don't rely on string-lines added in Emacs 28.1, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 3e6fae1244 146/166: DOC: fix typos in README.org, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6517af47b3 134/166: FIXED: sweep-init-args separate arguments, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 24a1e14ee9 151/166: MODIFIED: Breaking change: rename sweep.el to sweeprolog.el..., ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 13c7551015 156/166: ENHANCED: only fontify visible sweeprolog-mode buffers on idle, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog cada0d3871 166/166: DOC: document quasi-quotation highlighting in the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 85af4010e8 158/166: Use a public mailing list in the Maintainer package header, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 353ef846fb 035/166: ENHANCED: Pass keystrokes to the top-level directly when appropriate, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 72cc4d516b 014/166: PORT: detect linux vs macOS shared object extension in Makefile,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog e029eb3e3c 016/166: update .build.yml, ELPA Syncer, 2022/09/30
- [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