# add this dependency BEFORE including the other submakefiles.
-all: ${BUILD_DIR}/make/include/freeradius-devel src/freeradius-devel
-
-.PHONY: ${BUILD_DIR}/make/include/freeradius-devel
-${BUILD_DIR}/make/include/freeradius-devel:
- @[ -e $@ ] || (mkdir -p $(dir $@) && ln -s ${top_builddir}/src/include $@)
-
-.PHONY: src/freeradius-devel
-src/freeradius-devel:
- @[ -e $@ ] || (echo LN-S $@ && ln -s include $@)
-
-build/%.o build/%.lo: | src/freeradius-devel/ \
- ${BUILD_DIR}/make/include/freeradius-devel
+all:
+
+#
+# This nonsense is here because pattern rules don't work if you have
+# multiple of them. If you try to run the shell script by assigning
+# it to a variable, GNU Make notices that the variable isn't used...
+# and doesn't run the shell script. This crap below seems to bypass
+# Make's optimization.
+#
+ifeq "$(shell [ -e src/freeradius-devel ] || ln -s include src/freeradius-devel)" ""
+ # do nothing
+endif
SUBMAKEFILES := include/all.mk lib/all.mk tests/all.mk modules/all.mk main/all.mk