/
all.mk
26 lines (21 loc) · 944 Bytes
/
all.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# Changes the behaviour of autoconf.h to undef definitions that would conflict
# with module config.h files.
#
CFLAGS += -DIS_MODULE=1
SUBMAKEFILES := $(wildcard ${top_srcdir}/src/modules/rlm_*/all.mk)
SUBMAKEFILES += $(wildcard ${top_srcdir}/src/modules/proto_*/all.mk)
EXT_MODULES := $(subst ${top_srcdir}/,,$(wildcard ${top_srcdir}/src/modules/*_ext))
#
# If we haven't run configure, ignore the modules which require it.
# Otherwise, load in all of the module makefiles, including ones
# which have not yet been configured. We do the "sort" to remove
# duplicates.
#
ifeq "$(CONFIGURE_ARGS)" ""
NEEDS_CONFIG := $(patsubst %.in,%,$(foreach file,$(SUBMAKEFILES),$(wildcard $(file).in)))
SUBMAKEFILES := $(sort $(SUBMAKEFILES) $(NEEDS_CONFIG))
endif
src/modules/%/configure: src/modules/%/configure.ac
@echo AUTOCONF $(dir $@)
cd $(dir $@) && $(AUTOCONF) -I $(top_builddir) -I $(top_builddir)/m4 -I $(top_builddir)/$(dir $@)m4