ossp-pkg/val/Makefile.in 1.4 -> 1.5
--- Makefile.in 2002/03/13 18:35:58 1.4
+++ Makefile.in 2002/03/15 11:32:59 1.5
@@ -55,10 +55,22 @@
TST_NAME = val_test
TST_OBJS = val_test.o
+MAN_NAME = val-config.1 val.3
+
+# helper macro for generating a Unix manual page
+_MANPAGE = \
+ V1=`$(SHTOOL) version -ltxt -dshort VERSION`; \
+ V2=`$(SHTOOL) version -ltxt -dlong VERSION`; \
+ D=`$(SHTOOL) version -ltxt -dlong VERSION |\
+ sed -e 's;.*(;;' -e 's;).*;;'`; \
+ $(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \
+ --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\
+ sed -e "s;VAR_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}
+
.SUFFIXES:
.SUFFIXES: .c .o .lo
-all: $(LIB_NAME) $(TST_NAME)
+all: $(LIB_NAME) $(TST_NAME) $(MAN_NAME)
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
@@ -76,6 +88,15 @@
$(TST_NAME): $(TST_OBJS) $(LIB_NAME)
@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS)
+val-config.1: val-config.pod VERSION
+ BASENAME="val-config"; SEC=1; \
+ NAME="VAL"; ONELINE="Value Access"; \
+ $(_MANPAGE)
+val.3: val.pod VERSION
+ BASENAME="val"; SEC=3; \
+ NAME="VAL"; ONELINE="Value Access"; \
+ $(_MANPAGE)
+
check: $(TST_NAME)
@$(LIBTOOL) --mode=execute ./$(TST_NAME)
@@ -84,14 +105,22 @@
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir)
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir)
+ $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man1
+ $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man3
$(SHTOOL) install -c -m 755 val-config $(DESTDIR)$(bindir)/
$(SHTOOL) install -c -m 644 val.h $(DESTDIR)$(includedir)/
@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libval.la $(DESTDIR)$(libdir)/
+ $(SHTOOL) install -c -m 644 var-config.1 $(DESTDIR)$(mandir)/man1/
+ $(SHTOOL) install -c -m 644 var.3 $(DESTDIR)$(mandir)/man3/
uninstall:
+ -$(RM) $(DESTDIR)$(mandir)/man1/val-config.1
+ -$(RM) $(DESTDIR)$(mandir)/man3/val.3
@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libval.la
-$(RM) $(DESTDIR)$(includedir)/val.h
-$(RM) $(DESTDIR)$(bindir)/val-config
+ -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
-$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE)
-$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
-$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
@@ -112,4 +141,5 @@
-$(RM) configure config.h.in
-$(RM) shtool
-$(RM) ltmain.sh libtool.m4 config.guess config.sub
+ -$(RM) val-config.1 val.3
|
|