summaryrefslogtreecommitdiff
path: root/zhm/Makefile.in
diff options
context:
space:
mode:
authorGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-21 19:25:18 -0500
committerGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-21 22:07:33 -0500
commit76cd4baec8f5c266c8047cc88981f84701e1fc7a (patch)
treefd0d7216e88b8abc34a7adcc219c1d756d317ad7 /zhm/Makefile.in
parent651d606e5c60d472c56ff6ef03f7779e957573a8 (diff)
Substitute paths into man pages
Generate the man pages for zwgc, zctl, zhm, and zephyrd at build time, so they can refer to the paths actually used instead of whatever was used on Athena in the 1980's.
Diffstat (limited to 'zhm/Makefile.in')
-rw-r--r--zhm/Makefile.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/zhm/Makefile.in b/zhm/Makefile.in
index 801575d..cbaf6ab 100644
--- a/zhm/Makefile.in
+++ b/zhm/Makefile.in
@@ -21,6 +21,12 @@ LIBTOOL=@LIBTOOL@
CC=@CC@
INSTALL=@INSTALL@
+editman = sed \
+ -e 's|@datadir[@]|${datadir}|g' \
+ -e 's|@sysconfdir[@]|${sysconfdir}|g' \
+ -e 's|@sbindir[@]|${sbindir}|g' \
+ -e 's|@lsbindir[@]|${lsbindir}|g'
+
LIBZEPHYR=${BUILDTOP}/lib/libzephyr.la
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@
@@ -30,11 +36,15 @@ HESIOD_LIBS=@HESIOD_LIBS@
OBJS= timer.o queue.o zhm.o zhm_client.o zhm_server.o
-all: zhm
+all: zhm zhm.8
zhm: ${OBJS} ${LIBZEPHYR}
${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBZEPHYR} ${HESIOD_LIBS} -lcom_err
+zhm.8: ${srcdir}/zhm.8.in Makefile
+ ${editman} ${srcdir}/$@.in > $@.tmp
+ mv $@.tmp $@
+
.c.o:
${CC} -c ${ALL_CFLAGS} $<
@@ -47,6 +57,7 @@ install: zhm
clean:
${LIBTOOL} --mode=clean rm -f zhm
rm -f ${OBJS}
+ rm -f zhm.8
${OBJS}: zhm.h timer.h ${top_srcdir}/h/internal.h ${top_srcdir}/h/sysdep.h
${OBJS}: ${BUILDTOP}/h/config.h ${BUILDTOP}/h/zephyr/zephyr.h