From 9aaf16888c9bd1ab63f0336f6becca87525118c6 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Thu, 6 Nov 2008 19:40:28 +0000 Subject: [PATCH] Include demo.c and demo-async.c in the manpages under an EXAMPLE section --- Makefile | 7 ++++++- termkey_getkey.3 => termkey_getkey.3.sh | 11 +++++++++++ termkey_waitkey.3 => termkey_waitkey.3.sh | 11 +++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) rename termkey_getkey.3 => termkey_getkey.3.sh (91%) rename termkey_waitkey.3 => termkey_waitkey.3.sh (90%) diff --git a/Makefile b/Makefile index 8fcceef..5a08630 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ ifeq ($(DEBUG),1) CFLAGS_DEBUG=-ggdb -DDEBUG endif -all: demo demo-async +all: demo demo-async doc demo: libtermkey.so demo.c $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^ @@ -29,6 +29,11 @@ libtermkey.so: termkey.o driver-csi.o driver-ti.o %.o: %.c termkey.h termkey-internal.h $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -fPIC -o $@ -c $< +doc: termkey_waitkey.3 termkey_getkey.3 + +%.3: %.3.sh + sh $< >$@ + .PHONY: clean clean: rm -f *.o demo diff --git a/termkey_getkey.3 b/termkey_getkey.3.sh similarity index 91% rename from termkey_getkey.3 rename to termkey_getkey.3.sh index f77caa0..1b78948 100644 --- a/termkey_getkey.3 +++ b/termkey_getkey.3.sh @@ -1,3 +1,5 @@ +# vim:ft=nroff +cat <