aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bd6143e..dc65110 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ GOLDFLAGS = -L $(GOLIBDIR)
.SUFFIXES:
-.SUFFIXES: .go .a .c .o .bin .bin-check
+.SUFFIXES: .go .a .c .o .bin .bin-check .adoc
.c.o:
$(CC) $(CFLAGS) -o $@ -c $<
@@ -37,6 +37,9 @@ GOLDFLAGS = -L $(GOLIBDIR)
.a.bin:
go tool link -L $(@D) $(GOLDFLAGS) -o $@ --extldflags '$(LDLIBS)' $<
+.adoc:
+ asciidoctor -b manpage -o $@ $<
+
all:
@@ -49,6 +52,7 @@ mains.bin = $(mains.go:.go=.bin)
functional-tests/lib.a = $(functional-tests/lib.go:.go=.a)
fuzz-targets/lib.a = $(fuzz-targets/lib.go:.go=.a)
benchmarks/lib.a = $(benchmarks/lib.go:.go=.a)
+manpages.N = $(manpages.N.adoc:.adoc=)
cgo.go = \
src/_cgo_import.go \
@@ -80,6 +84,7 @@ derived-assets = \
$(mains.a) \
$(mains.bin) \
$(NAME).bin \
+ $(manpages.N) \
side-assets = \
src/_cgo_export.h \
@@ -176,6 +181,11 @@ bench: $(benchmarks/main.bin-check)
+i18n:
+ po4a po/po4a.cfg
+
+
+
## Remove *all* derived artifacts produced during the build.
## A dedicated test asserts that this is always true.
clean:
@@ -192,7 +202,8 @@ install: all
cp $(NAME).bin '$(DESTDIR)$(BINDIR)'/$(NAME)
cp src/$(NAME).a '$(DESTDIR)$(GOLIBDIR)'
- cp -P $(sources) '$(DESTDIR)$(SRCDIR)'
+ cp $(sources) '$(DESTDIR)$(SRCDIR)'
+ mandir install '$(DESTDIR)$(MANDIR)' $(manpages.N)
## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror
## of the "install" target, and removes *all* that was installed.
@@ -203,6 +214,8 @@ uninstall:
'$(DESTDIR)$(GOLIBDIR)'/$(NAME).a \
'$(DESTDIR)$(SRCDIR)' \
+ mandir uninstall '$(DESTDIR)$(MANDIR)' $(manpages.N)
+
ALWAYS: