summaryrefslogtreecommitdiffstats
path: root/xpa/doc/Makefile
blob: eda89316b16caafd7f2fc9aa9978f2a2c88cc0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Makefile for misc programs, not good enough for their own directory
#

RM	= rm
RMFLAGS	= -f
MV	= mv
MVFLAGS	= -f
CP	= cp
CPFLAGS	= -p

MANDIR =	../man

all:		dirs files hardcopy

dirs:
		@(if [ ! -d ${MANDIR} ]; then 				\
		    mkdir ${MANDIR}; 					\
		    mkdir ${MANDIR}/man1 ${MANDIR}/man3 ${MANDIR}/mann; \
		fi)

files:
		@(for i in *.html; do \
		    echo processing $$i; \
		    ./html2man ../man < $$i; \
		done)

hardcopy:	
		html2ps -C fb -d -g -n -u -W b -x 1 -o xpa.ps help.html
		ps2pdf xpa.ps xpa.pdf


# NB: sman.conf must be copied to $HOME or else its not found ...
# we also have to figure out where swish-e is located and hardwire it
index:  szlong
	@(cd ..; MANPATH=`pwd`/man; export MANPATH; cd doc; \
	SW=`which swish-e`; \
	SZ_LONG=`./szlong`; \
	sed -e 's#@SW@#'$$SW'#g' < sman_conf.tmpl > $${HOME}/sman.conf; \
	sman-update --clearcache; \
	sman-update --verbose --index=./sman/xpa$${SZ_LONG}.index; \
	rm -f $${HOME}/sman.conf szlong)

szlong: szlong.c
	$(CC) $(CFLAGS) -o szlong szlong.c

clean:
	-$(RM) $(RMFLAGS) *.BAK *.bak *.o core errs ,* *~ *.a \
	foo* goo* tags TAGS html2ps.dbg