shithub: mc

Download patch

ref: 9e4686498bb2536f923cb0d5517b8911e85e1239
parent: d382b545553959a59667f7b07dc88bb223eb6aa0
author: Ori Bernstein <[email protected]>
date: Tue Dec 17 18:09:24 EST 2013

Refactor manpage install.

    Now, we do it from within myr.mk, and we do it to the right
    place generically.

--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,17 +1,5 @@
 MAN=myr-regex.3 \
 
 include ../config.mk
-
-all:
-	
-install:
-	@for i in $(MAN); do \
-	    MANSECT=$$(echo $$i | awk -F. '{print $$NF}'); \
-	    echo mkdir -p $(INST_ROOT)/share/man/man$$MANSECT; \
-	    echo install -m 644 $(MAN) $(INST_ROOT)/share/man/man$${MANSECT}; \
-	    mkdir -p $(INST_ROOT)/share/man/man$$MANSECT; \
-	    install -m 644 $(MAN) $(INST_ROOT)/share/man/man$${MANSECT}; \
-	done \
-
-clean:
+include ../mk/myr.mk
 
--- a/mk/myr.mk
+++ b/mk/myr.mk
@@ -39,7 +39,7 @@
 	rm -f $(USE)
 	rm -f lib$(MYRLIB).a
 
-install: subdirs-install install-bin install-lib
+install: subdirs-install install-bin install-lib install-man
 
 install-bin: $(MYRBIN)
 	@if [ ! -z "$(MYRBIN)" ]; then \
@@ -56,6 +56,15 @@
 		install -m 644 $(_LIBNAME) $(INST_ROOT)/lib/myr; \
 		install -m 644 $(MYRLIB) $(INST_ROOT)/lib/myr; \
 	fi
+
+install-man:
+	@for i in $(MAN); do \
+	    MANSECT=$$(echo $$i | awk -F. '{print $$NF}'); \
+	    echo mkdir -p $(INST_ROOT)/share/man/man$$MANSECT; \
+	    echo install -m 644 $(MAN) $(INST_ROOT)/share/man/man$${MANSECT}; \
+	    mkdir -p $(INST_ROOT)/share/man/man$$MANSECT; \
+	    install -m 644 $(MAN) $(INST_ROOT)/share/man/man$${MANSECT}; \
+	done \
 
 config.mk:
 	./configure