aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile87
-rwxr-xr-xaux/assert-perltidy.sh0
-rw-r--r--doc/gistatic-templates.pod.519
-rw-r--r--doc/gistatic.pod.119
-rw-r--r--etc/gistatic/templates/html/commit.tmpl0
-rw-r--r--scripts/gistatic.pl0
7 files changed, 63 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index 87174b6..25b396f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/public/
+/pod2htmd.tmp
diff --git a/Makefile b/Makefile
index 75614eb..3c30832 100644
--- a/Makefile
+++ b/Makefile
@@ -1,97 +1,58 @@
.POSIX:
-CC = c99
-CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -fPIC -g -O3
-LDFLAGS = -Wl,-rpath,$$LIBRARY_PATH
-LDLIBS =
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
DATE = 1970-01-01
-MAJOR = 0
-MINOR = 1
-PATCH = 0
-VERSION = $(MAJOR).$(MINOR).$(PATCH)
+VERSION = 0.1.0
NAME = gistatic
-headers = \
- src/f.h
-
-sources = \
- src/f.c
+sysconfs = \
+ etc/gistatic/templates/html/commit.tmpl
manpages = \
- doc/f.1
-
-
-objects = $(sources:.c=.o)
-
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) -c $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-libname = lib$(NAME)
-liba = $(libname).a
-libso = $(libname).so
-libso-real = $(libso).$(MAJOR).$(MINOR).$(PATCH)
-soaliases = $(libso).$(MAJOR).$(MINOR) $(libso).$(MAJOR) $(libso)
+ doc/gistatic.pod.1 \
+ doc/gistatic-templates.pod.5
-all: $(liba) $(libso-real) run-tests
-
-$(liba): $(headers) $(objects)
- ar rcsv $@-t $(objects)
- ranlib $@-t
- mv $@-t $@
-
-$(libso-real): $(headers) $(objects)
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(libso).$(MAJOR) -o $@ $(objects)
-
-$(soaliases): $(libso-real)
- ln -sf $? $@
-
-run-tests: $(headers) $(sources) tests/tests.c
- $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ tests/tests.c $(sources) $(LDLIBS)
-
-fallible-tests: $(headers) $(sources) tests/tests.c
- $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -DFALLIBLE -o $@ tests/tests.c $(sources) $(LDLIBS) -lfallible
+all:
check: all
- ./run-tests
sh tests/cli-opts.sh
-dev-check: check fallible-tests
- valgrind `fallible-check --valgrind-flags` ./run-tests
- fallible-check ./fallible-tests
- sh aux/assert-clang-format.sh
+dev-check: check
+ podchecker doc/*
+ sh aux/assert-perltidy.sh
sh aux/assert-shellcheck.sh
sh aux/workflow/assert-todos.sh
sh aux/workflow/assert-changelog.sh $(NAME)
do_subst = sed \
-e 's:[@]VERSION[@]:$(VERSION):g' \
- -e 's:[@]DATE[@]:$(DATE):g'
-
-install: all $(soaliases)
- for h in $(headers); do install -m 644 -D $$h $(DESTDIR)$(PREFIX)/include/`basename $$h`; done
- for f in $(liba) $(libso-real); do install -m 755 -D $$f $(DESTDIR)$(PREFIX)/lib/$$f; done
- for a in $(soaliases); do mv $$a $(DESTDIR)$(PREFIX)/lib/; done
+ -e 's:[@]DATE[@]:$(DATE):g' \
+ -e 's:[@]PREFIX[@]:$(PREFIX):g'
+
+install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ $(do_subst) < scripts/gistatic.pl > $(DESTDIR)$(PREFIX)/bin/gistatic
+ chmod +755 $(DESTDIR)$(PREFIX)/bin/gistatic
+ for s in $(sysconfs); do install -m 644 -D $$s $(DESTDIR)$(PREFIX)/$$s; done
for m in $(manpages); do \
n=$${m##*.}; \
- mkdir -p $(DESTDIR)$(MANPREFIX)/man$$m; \
- $(do_subst) < $$m | gzip > $(DESTDIR)$(MANPREFIX)/man$$n/`basename $$m`.gz; \
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man$$n; \
+ $(do_subst) < $$m | pod2man | gzip > $(DESTDIR)$(MANPREFIX)/man$$n/`basename $${m%%.*}.$$n`.gz; \
done
uninstall:
- for h in $(headers); do rm -f $(DESTDIR)$(PREFIX)/include/`basename $$h`; done
- for l in $(liba) $(libso-real) $(soaliases); do rm -f $(DESTDIR)$(PREFIX)/lib/$$l; done
- for m in $(manpages); do rm -f $(DESTDIR)$(MANPREFIX)/man$${m##*.}/`basename $$m`.gz; done
+ rm -f $(DESTDIR)$(PREFIX)/bin/gistatic
+ for s in $(sysconfs); do rm -f $(DESTDIR)$(PREFIX)/$$s; done
+ for m in $(manpages); do rm -f $(DESTDIR)$(MANPREFIX)/man$${m##*.}/`basename $${m%%.*}`.$${m##*.}.gz; done
clean:
- rm -rf public/ $(objects) $(liba) $(libso-real) $(soaliases) run-tests fallible* vgcore*
+ rm -rf public/
dist:
sh aux/workflow/dist.sh $(DATE) $(VERSION) $(NAME)
public: README.md TODOs.md CHANGELOG.md
sh aux/workflow/public.sh gistatic $(NAME) public-inbox
+ for m in $(manpages); do pod2html $$m > public/`basename $${m%%.*}`.$${m##*.}.html; done
.PHONY: all clean check dev-check dist install uninstall
diff --git a/aux/assert-perltidy.sh b/aux/assert-perltidy.sh
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/aux/assert-perltidy.sh
diff --git a/doc/gistatic-templates.pod.5 b/doc/gistatic-templates.pod.5
new file mode 100644
index 0000000..db90e5d
--- /dev/null
+++ b/doc/gistatic-templates.pod.5
@@ -0,0 +1,19 @@
+=pod
+
+=head1 Heading Text
+
+=head2 Heading Text
+
+=head3 Heading Text
+
+=head4 Heading Text
+
+=begin format
+
+=end format
+
+=for format text...
+
+=encoding utf8
+
+=cut
diff --git a/doc/gistatic.pod.1 b/doc/gistatic.pod.1
new file mode 100644
index 0000000..db90e5d
--- /dev/null
+++ b/doc/gistatic.pod.1
@@ -0,0 +1,19 @@
+=pod
+
+=head1 Heading Text
+
+=head2 Heading Text
+
+=head3 Heading Text
+
+=head4 Heading Text
+
+=begin format
+
+=end format
+
+=for format text...
+
+=encoding utf8
+
+=cut
diff --git a/etc/gistatic/templates/html/commit.tmpl b/etc/gistatic/templates/html/commit.tmpl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/etc/gistatic/templates/html/commit.tmpl
diff --git a/scripts/gistatic.pl b/scripts/gistatic.pl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/scripts/gistatic.pl