From 42c71605760385187be5f48f03fecec71c32bc79 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 23 May 2012 13:35:32 +0800 Subject: [PATCH] docs: Add initial manpages Mostly generated from help2man output. Signed-off-by: Jeremy Kerr --- Makefile | 15 +++++++++++++-- docs/sbsign.1.in | 2 ++ docs/sbverify.1.in | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 docs/sbsign.1.in create mode 100644 docs/sbverify.1.in diff --git a/Makefile b/Makefile index 1fd9450..6027969 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ sbsign_objs = sbsign.o idc.o image.o sbverify_objs = sbverify.o idc.o image.o libs = -lbfd -lcrypto objs = $(sort $(sbsign_objs) $(sbverify_objs)) +docs = docs/sbsign.1 docs/sbverify.1 # ccan build configuration ccan_dir = lib/ccan @@ -23,8 +24,10 @@ ccan_config = $(ccan_dir)/config.h DESTDIR ?= prefix ?= /usr bindir ?= ${prefix}/bin -install_dirs = install -m 755 -d $(DESTDIR)$(bindir) +man1dir = ${prefix}/share/man/man1/ +install_dirs = install -m 755 -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) install_bin = install -m 755 -t $(DESTDIR)$(bindir) +install_man1 = install -m 755 -t $(DESTDIR)$(man1dir) # dist package = sbsigntool @@ -55,12 +58,20 @@ $(ccan_objs): $(ccan_stamp) $(ccan_config): $(ccan_stamp) cd $(@D) && $(MAKE) config.h +# doc build +docs: $(docs) +.PHONY: docs + +$(docs): docs/%.1: docs/%.1.in % + help2man --no-info -i $< -o $@ $(patsubst %.1, ./%, $(@F)) + # built objects may require headers from ccan $(objs): $(ccan_stamp) $(ccan_config) -install: $(tools) +install: $(tools) $(docs) $(install_dirs) $(install_bin) $(tools) + $(install_man1) $(docs) .PHONY: install clean: diff --git a/docs/sbsign.1.in b/docs/sbsign.1.in new file mode 100644 index 0000000..0ea4168 --- /dev/null +++ b/docs/sbsign.1.in @@ -0,0 +1,2 @@ +[name] +sbsign - UEFI secure boot signing tool diff --git a/docs/sbverify.1.in b/docs/sbverify.1.in new file mode 100644 index 0000000..1d00fff --- /dev/null +++ b/docs/sbverify.1.in @@ -0,0 +1,2 @@ +[name] +sbverify - UEFI secure boot verification tool