aboutsummaryrefslogtreecommitdiff
path: root/ksiders/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ksiders/Makefile')
-rw-r--r--ksiders/Makefile23
1 files changed, 13 insertions, 10 deletions
diff --git a/ksiders/Makefile b/ksiders/Makefile
index 674b3e6..38b33c7 100644
--- a/ksiders/Makefile
+++ b/ksiders/Makefile
@@ -25,32 +25,35 @@ MAN1DIR=$(MANDIR)/man1
# Comment out next line if your system does not support gzip'ed man pages
GZIP_MAN=y
+# Some distros have this with a .py extension, some don't. Only needed
+# if you're rebuilding the man pages (users shouldn't have to).
+# RST2MAN=rst2man.py
+RST2MAN=rst2man
+
EXES=atrdir atrextr makeatr sortatr unmakatr
-MANS=atrdir atrextr makeatr sortatr
+MANS=atrdir.1 atrextr.1 makeatr.1 sortatr.1 unmakatr.1
+
+all: $(EXES) $(MANS)
-all: $(EXES)
+%.1: %.rst manhdr.rst manftr.rst
+ $(RST2MAN) $< > $@
clean:
rm -f $(EXES) atr.o tags *~ *.bak
install: all
- mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) ;\
+ mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MAN1DIR) ;\
for exe in $(EXES) ; do \
strip $$exe ;\
cp $$exe $(DESTDIR)$(BINDIR)/$$exe ;\
done ;\
for man in $(MANS) ; do \
if [ "$(GZIP_MAN)" = "y" ]; then \
- gzip -c < $$man.1 > $(DESTDIR)$(MAN1DIR)/$$man.1.gz ;\
+ gzip -c < $$man > $(DESTDIR)$(MAN1DIR)/$$man.gz ;\
else \
- cp $$man.1 $(DESTDIR)$(MAN1DIR) ; \
+ cp $$man $(DESTDIR)$(MAN1DIR) ; \
fi ;\
done
- if [ "$(GZIP_MAN)" = "y" ]; then \
- cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1.gz && ln -s makeatr.1.gz unmakatr.1.gz ;\
- else \
- cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1 && ln -s makeatr.1 unmakatr.1 ;\
- fi
atr.o: atr.c atr.h atdos.h kboot.h