summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile27
-rwxr-xr-xt/00-compile.t8
-rwxr-xr-xt/10-pod-coverage.t8
3 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..550126d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+PREFIX ?= /usr/local
+
+main_dir = ${DESTDIR}${PREFIX}
+
+build/icli.1: bin/icli
+ mkdir -p build
+ pod2man $< > $@
+
+install: build/icli.1
+ mkdir -p ${main_dir}/bin ${main_dir}/share/man/man1
+ cp bin/icli ${main_dir}/bin/icli
+ cp build/icli.1 ${main_dir}/share/man/man1/icli.1
+ chmod 755 ${main_dir}/bin/icli
+ chmod 644 ${main_dir}/share/man/man1/icli.1
+
+
+test:
+ @prove
+
+uninstall:
+ rm -f ${main_dir}/bin/icli
+ rm -f ${main_dir}/share/man/man1/icli.1
+
+clean:
+ rm -rf build
+
+.PHONY: clean install test uninstall
diff --git a/t/00-compile.t b/t/00-compile.t
new file mode 100755
index 0000000..31e3f3e
--- /dev/null
+++ b/t/00-compile.t
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+use Test::More;
+use Test::Compile;
+
+all_pl_files_ok('bin/icli');
diff --git a/t/10-pod-coverage.t b/t/10-pod-coverage.t
new file mode 100755
index 0000000..1b2bbc0
--- /dev/null
+++ b/t/10-pod-coverage.t
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+use Test::More;
+use Test::Pod;
+
+all_pod_files_ok('bin/icli');