commit 3f5316c5462e58c5ad5ef6cc110c2a6ff4f3243f
parent e5e9b0034bc40490eea41b4e111d8e1e78f88460
Author: z3bra <willy@mailoo.org>
Date: Wed, 12 Feb 2014 14:41:58 +0100
Build manpages in makefile
Diffstat:
4 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,6 +1,6 @@
include config.mk
-.SUFFIXES: .c .o
+.SUFFIXES: .c .o .gz
.PHONY : all clean install uninstall
.c.o:
@@ -11,14 +11,18 @@ prout: prout.o
@echo -e "LD prout"
@${LD} $^ -o $@ ${LDFLAGS}
-all : prout
+prout.1.gz: prout.1
+ @echo "GZ $<"
+ @${GZ} -c $< > $@
+
+all : prout prout.1.gz
clean :
- ${RM} -f prout *.o *~
+ ${RM} -f prout *.o *.gz *~
-install: ${BIN}
- install -D -m 0755 bin/prout ${DESTDIR}${PREFIX}/bin/prout
- install -D -m 0644 ${MANDIR}/prout.1.gz ${DESTDIR}${MANPREFIX}/man1/prout.1.gz
+install: prout prout.1.gz
+ install -D -m 0755 prout ${DESTDIR}${PREFIX}/bin/prout
+ install -D -m 0644 prout.1.gz ${DESTDIR}${MANPREFIX}/man1/prout.1.gz
uninstall:
${RM} ${DESTDIR}${PREFIX}/bin/prout
diff --git a/config.mk b/config.mk
@@ -5,5 +5,6 @@ MANPREFIX:=${PREFIX}/share/man
CC = cc
LD= ${CC}
RM = rm
+GZ = gzip
CFLAGS = -Wall -I inc -pedantic `cups-config --cflags`
LDFLAGS = `cups-config --libs`
diff --git a/prout.1 b/prout.1
@@ -0,0 +1,51 @@
+.\" (C) Copyright 1992-1999 Rickard E. Faith and David A. Wheeler
+.\" (faith@cs.unc.edu and dwheeler@ida.org)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Tue Oct 15 10:40:00 2013 by Willy Goiffon
+.\"
+.TH MAN 1 2013-10-15 "Linux" "print out"
+.SH NAME
+prout - print out a documents to the default CUPS printer
+.SH SYNOPSIS
+.B prout
+.RI [\| OPTIONS\| ]
+.I <file>
+.SH DESCRIPTION
+.PP
+.B prout
+sends
+.I <file>
+to the default printer. Then it gives you the job number, and exits
+.TP
+.B \-h
+Display a help text
+.SH BUGS
+.PP
+No bugs know actually. Feel free to report them at willy@mailoo.org
+.SH AUTHORS / CONTRIBUTORS
+Willy Goiffon is the main author. Source code based on the CUPS API provided at http://www.cups.org/documentation.php/iapi-cups.html.
+Thanks to quinq @ freenode for the name.
+.SH SEE ALSO
+.BR client.conf (5)
diff --git a/prout.1.gz b/prout.1.gz
Binary files differ.