build: grab "dependent_headers" from respective Makefile.am

...with "echo path/*.h" fallback (equivalent of wildcard function) if
the new methods fails for some reason.
This commit is contained in:
Jan Pokorný 2016-02-18 18:32:08 +01:00
parent cabe021d47
commit 0b04ed5e77
No known key found for this signature in database
GPG Key ID: 61BBB23A9E8F8DE2

View File

@ -24,14 +24,19 @@ noinst_HEADERS = mainpage.h
dist_man_MANS = man8/qb-blackbox.8
if HAVE_DOXYGEN
inc_dir = $(top_srcdir)/include/qb
dependent_headers = $(wildcard $(inc_dir)/qb*.h)
dependent_headers = $(subst $(inc_dir),,$(shell \
printf 'include $(inc_dir)/Makefile.am\n\n%%.var:\n\t@echo $$($$*)' \
| ${MAKE} --no-print-directory -f - inst_HEADERS.var \
|| echo $(inc_dir)/qb*.h))
dist_man_MANS += man3/qbipcc.h.3 man3/qbipcs.h.3 man3/qbatomic.h.3 \
man3/qbhdb.h.3 man3/qbipc_common.h.3 man3/qblist.h.3 \
man3/qbloop.h.3 man3/qbutil.h.3 man3/qbarray.h.3 \
man3/qblog.h.3 man3/qbmap.h.3
$(dist_man_MANS): man.dox $(dependent_headers)
$(dist_man_MANS): man.dox $(dependent_headers:%=$(inc_dir)/%)
mkdir -p man3
doxygen man.dox