Support for editing history files
[clawsker.git] / Makefile
index 7c044eb9dba569edf9763912a9388cfb2de8bec5..e504ae5571dd3fe2aa2ff70bb1aea2933734d9d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #
 # Clawsker Makefile
-# Copyright 2007-2017 Ricardo Mones <ricardo@mones.org>
+# Copyright 2007-2023 Ricardo Mones <ricardo@mones.org>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
 #
 
 NAME = clawsker
-VERSION ?= 1.1.0
+VERSION ?= 1.3.8
 PREFIX ?= /usr/local
 BINDIR = ${PREFIX}/bin
 DATADIR = ${PREFIX}/share
@@ -26,7 +26,11 @@ all: build
 
 build: ${NAME}.1
        -mkdir build
-       sed -e "s,@PREFIX@,${PREFIX},;s,@LIBDIR@,${LIBDIR},;s,@VERSION@,${VERSION},;s,@DATADIR@,${DATADIR}," < ${NAME} > build/${NAME}
+       perl -MConfig -p -e'1..1 and s/.*/$$Config{startperl}/;' \
+               -e's,\@PREFIX\@,${PREFIX},;' \
+               -e's,\@LIBDIR\@,${LIBDIR},;' \
+               -e's,\@VERSION\@,${VERSION},;' \
+               -e's,\@DATADIR\@,${DATADIR},' ${NAME} > build/${NAME}
        cp -p $< build/$<
        ${MAKE} -C po build
 
@@ -79,6 +83,8 @@ dist:
        cp -p po/unmaint/*.po ${NAME}-${VERSION}/po/unmaint
        mkdir ${NAME}-${VERSION}/icons
        cp -p icons/*.xcf icons/*.png ${NAME}-${VERSION}/icons
+       mkdir ${NAME}-${VERSION}/t
+       cp -p t/*.t ${NAME}-${VERSION}/t
        tar cJf ${NAME}-${VERSION}.tar.xz ${NAME}-${VERSION} \
                && rm -rf ${NAME}-${VERSION}
 
@@ -90,5 +96,12 @@ clean: clean-build
        rm -f *~
        ${MAKE} -C po clean
 
-.PHONY: all build install install-dirs install-icons-dirs install-icons uninstall uninstall-icons clean clean-build dist
+test-setup:
+       @test -h t/Clawsker.pm || ( cd t/ && ln -s ../clawsker Clawsker.pm )
 
+test: test-setup
+       @env DISPLAY= prove -It
+
+.PHONY: all build install install-dirs install-icons-dirs install-icons
+.PHONY: uninstall uninstall-icons clean clean-build dist
+.PHONY: test-setup test