summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-11-13 16:38:45 +0000
committerVivien Kraus <vivien@planete-kraus.eu>2021-11-13 16:59:34 +0000
commit677aae3ffd5162ea9b630f051d4be17091ed1a16 (patch)
tree98e0f404e8bc9e642ce3789c15ba42437d7d978c
parentfdfc737ce34840a768c98aa370725dbe650a6a3c (diff)
Generate a minimal meson.build to have vala language server
-rw-r--r--Makefile.am1
-rw-r--r--README43
-rwxr-xr-xgen-meson.build31
-rw-r--r--meson.am21
4 files changed, 57 insertions, 39 deletions
diff --git a/Makefile.am b/Makefile.am
index 3d629ab..16f3e50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,6 +39,7 @@ include doc/Makefile.am
include tests/Makefile.am
include icons.am
include settings.am
+include meson.am
EXTRA_DIST += $(top_srcdir)/.version $(top_srcdir)/.release-date
BUILT_SOURCES += $(top_srcdir)/.version $(top_srcdir)/.release-date
diff --git a/README b/README
index 0324bd2..cca85be 100644
--- a/README
+++ b/README
@@ -41,47 +41,12 @@ These are the run-time dependencies:
To build, first run the =bootstrap= script, then =./configure=,
=make=. You can run the program without installing it, by running
-=./pre-inst-env guile src/disfluid=, or you can install it with
-=make install=.
+=./pre-inst-env guile src/disfluid=, or you can install it with =make
+install=. If you want to have VLS (Vala Language Server) support, run
+=make meson.build= to generate a partial meson project definition, at
+least for vala code.
* Running
Once installed, you get a program named =disfluid=. Run it with =-h=
to get the options.
-
-* Running as a docker image
-The =guix/vkraus/systems/test.scm= contains a couple of servers, one
-for [[http://localhost:8081/alice#me]] (the password is "alice"), and one
-for [[http://localhost:8082/bob#me]] (the password is "bob"). Both servers
-running on localhost:8081 and localhost:8082 are aware that they are
-http-only and run on these ports.
-
-Once you have the Guix channel installed, you can build the image as:
-
-#+begin_src shell
- sudo docker load -i $(guix system docker-image guix/vkraus/systems/test.scm) \
- && sudo docker tag guix:latest vivienkraus/disfluid:test-bench
-#+end_src
-
-I try to publish recent versions of the test bench on Docker Hub, but
-I may forget. Don’t forget to remind me if you think it’s too old.
-
-Then, you will need to start the container:
-
-#+begin_src shell
- export container_id="$(sudo docker create vivienkraus/disfluid:test-bench)"
- sudo docker start $container_id
-#+end_src
-
-You can enter the container to check the log files, for instance:
-
-#+begin_src shell
- sudo docker exec -it $container_id /run/current-system/profile/bin/bash --login
-#+end_src
-
-Unfortunately, I don’t know how to let the host access the 8081 and
-8082 ports.
-
-# Local Variables:
-# mode: org
-# End:
diff --git a/gen-meson.build b/gen-meson.build
new file mode 100755
index 0000000..4896fbd
--- /dev/null
+++ b/gen-meson.build
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+cat <<EOF
+project('$PACKAGE', 'vala', 'c')
+EOF
+
+COMMA=""
+printf "add_project_arguments(["
+for arg in $AM_VALAFLAGS
+do
+ printf "%s'%s'" "$COMMA" "$arg"
+ COMMA=","
+done
+printf "], language: 'vala')\n"
+
+COMMA=""
+printf "executable('disfluid-gui', files("
+for source in $src_ui_disfluid_gui_SOURCES
+do
+ printf "%s'%s'" "$COMMA" "$source"
+ COMMA=","
+done
+printf "), dependencies: ["
+
+COMMA=""
+for dep in glib-2.0 gobject-2.0
+do
+ printf "%sdependency('%s')" "$COMMA" "$dep"
+ COMMA=","
+done
+printf "])\n"
diff --git a/meson.am b/meson.am
new file mode 100644
index 0000000..0e8aa31
--- /dev/null
+++ b/meson.am
@@ -0,0 +1,21 @@
+# disfluid, implementation of the Solid specification
+# Copyright (C) 2021 Vivien Kraus
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+EXTRA_DIST += %reldir%/gen-meson.build
+
+meson.build: %reldir%/gen-meson.build config.status
+ $(AM_V_GEN) PACKAGE="$(PACKAGE)" src_ui_disfluid_gui_SOURCES="$(src_ui_disfluid_gui_SOURCES)" AM_VALAFLAGS="$(AM_VALAFLAGS)" $(SHELL) $< > $@-t
+ @mv $@-t $@