X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2FMakebottom;h=bb8c67d0ecb12b244a880e15b33d637afdc15cbe;hb=97a4429d582472bea43e317bd97b1b2d715cfe27;hp=36f731870c3d093dbf276f532525dc55d10a45f6;hpb=c68d828176dca7404dffc8d45c0141ffc98e8d02;p=libucw.git diff --git a/build/Makebottom b/build/Makebottom index 36f73187..bb8c67d0 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -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]"` @@ -63,8 +63,9 @@ endif %.so: $(M)LD $@ - $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(BUILDSYS)/lib-flags $^) $(LIBS) + $(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. @@ -74,7 +75,7 @@ endif %.dylib: %.so cd $(dir $<) && ln -fs $(notdir $<) $(notdir $@) -$(o)/%.pc: $(s)/%.pc $(o)/%.$(LS) +$(o)/%.pc: $(s)/%.pc $(o)/%$(LV).$(LS) $(M)PC $< $(Q)DEPS="$(shell $(BUILDSYS)/lib-deps $^)" LIBDIR=$(@D) $(BUILDSYS)/genconf $< $@ $(o)/config.mk $(Q)mkdir -p $(o)/pkgconfig @@ -142,21 +143,19 @@ $(o)/%-tt.o: $(s)/%.c $(o)/autoconf.h $(o)/%-t: $(o)/%-tt.o $(TESTING_DEPS) $(M)LD-TEST $@ - $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(BUILDSYS)/lib-flags $^) $(LIBS) + $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" PKG_CONFIG_OPTS="$(PKG_CONFIG_OPTS)" $(BUILDSYS)/lib-flags $^) $(LIBS) $(o)/%.test: $(s)/%.t $(BUILDSYS)/tester $(M)TEST $@ $(Q)$(BUILDSYS)/tester --rundir=run $(TESTERFLAGS) $< && touch $@ -.NOTPARALLEL: $(o)/%.test - # Rules for binaries BINDIR=bin $(o)/%: $(o)/%.o $(M)LD $@ - $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(BUILDSYS)/lib-flags $^) $(LIBS) + $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" PKG_CONFIG_OPTS="$(PKG_CONFIG_OPTS)" $(BUILDSYS)/lib-flags $^) $(LIBS) $(Q)$(call symlink,$@,run/$(BINDIR)) $(o)/%: $(s)/%.sh $(o)/config.mk $(BUILDSYS)/genconf @@ -211,6 +210,12 @@ $(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)/%: $(s)/%.txt + $(M)"DOC-MAN $<" + $(Q)a2x -d manpage -f manpage -D $(dir $@) $< + $(Q)mkdir -p run/$(DOCDIR)/man/man$(subst .,,$(suffix $@)) + $(Q)$(call symlink,$@,run/$(DOCDIR)/man/man$(subst .,,$(suffix $@))) + # 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.