]> mj.ucw.cz Git - libucw.git/blobdiff - build/Makebottom
Merge branch 'dev-table'
[libucw.git] / build / Makebottom
index 898a8feb488a9d8c494e727efaabffb2afda6daa..585204dcbaf10fcbc54d48f77ba5112bb528f085 100644 (file)
@@ -18,7 +18,7 @@ programs: $(PROGS)
 datafiles: $(DATAFILES)
 tests: $(TESTS)
 configs: $(addprefix run/$(CONFIG_DIR)/,$(CONFIGS))
-docs: runtree $(DOCS) $(DOC_INDICES)
+docs: runtree $(DOCS) $(DOC_INDICES) $(MANPAGES)
 
 tags:
        etags `find . -name "*.[ch]"`
@@ -65,6 +65,7 @@ endif
        $(M)LD $@
        $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" PKG_CONFIG_OPTS="$(PKG_CONFIG_OPTS)" $(BUILDSYS)/lib-flags $^) $(LIBS)
        $(Q)$(call symlink-alias,$@,run/$(SO_RUNDIR),$(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX))
+       $(Q)ln -fs $(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX) run/$(SO_RUNDIR)/$(*F)$(SONAME_INFIX).so
 
 # On Darwin, gcc expects shared libraries in *.dylib instead of *.so.
 # Surprisingly, when a program is run, it suffices to have *.so files.
@@ -209,6 +210,11 @@ $(o)/%.html: $(o)/%.txt $(BUILDSYS)/asciidoc.conf $(BUILDSYS)/asciidoc-xhtml.con
        $(Q)asciidoc -e -f $(BUILDSYS)/asciidoc.conf -f $(BUILDSYS)/asciidoc-xhtml.conf -f $(HOST_PREFIX)/etc/asciidoc/asciidoc.conf -f $(HOST_PREFIX)/etc/asciidoc/xhtml11.conf $<
        $(Q)$(call symlink,$@,run/$(DOCDIR)/$(DOC_MODULE))
 
+$(MANPAGES): $(o)/%.1: $(s)/%.txt
+       $(M)"MANPAGE $<"
+       $(Q)a2x -d manpage -f manpage $<
+       $(Q)mv $(patsubst %.txt, %.1, $<) $(dir $@)
+
 # In reality, we do not depend on the .txt files, but on the corresponding .deflist's.
 # However, the Makefile language cannot express that doc-extract generates both .txt
 # and .deflist, so we always use the .txt's in dependencies.