aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArun Isaac2024-12-04 17:20:28 +0000
committerArun Isaac2024-12-04 17:20:28 +0000
commit76091d246a3e4d72526c26af600847991fa583b8 (patch)
tree927415c176dd1491a2adaa8e33799e13ce5b5750 /Makefile
parent9a21bfeff8698e441fcd38cc77c895c5d2e9817d (diff)
downloadravanan-76091d246a3e4d72526c26af600847991fa583b8.tar.gz
ravanan-76091d246a3e4d72526c26af600847991fa583b8.tar.lz
ravanan-76091d246a3e4d72526c26af600847991fa583b8.zip
bin: Add --version flag.
* ravanan/config.scm.in (%project, %version): New variables. * Makefile (version): New variable. (%.scm): Substitute %project and %version too. * bin/ravanan: Import (ravanan config). (%options): Add --version. (print-usage): Document it. (main): Implement it.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1eaecfa..0201655 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@
# along with ravanan. If not, see <https://www.gnu.org/licenses/>.
project = ravanan
+version = 0.1.0
GUILD ?= guild
GUILE ?= guile
@@ -47,7 +48,7 @@ godir = $(libdir)/guile/$(guile_effective_version)/site-ccache
all: $(objects) $(config_file)
%.scm: %.scm.in
- $(SED) 's|@NODE@|$(NODE)|' $< > $@
+ $(SED) -e 's|@PROJECT@|$(project)|' -e 's|@VERSION@|$(version)|' -e 's|@NODE@|$(NODE)|' $< > $@
%.go: %.scm $(config_file)
GUILE_AUTO_COMPILE=0 $(GUILD) compile -L . -o $@ $<