]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Autolink utility headers
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 16 May 2018 15:24:41 +0000 (21:24 +0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 16 May 2018 15:24:41 +0000 (21:24 +0600)
src/include/all.mk
src/include/ldap [deleted symlink]
src/lib/all.mk

index f5b03732c7a9685804e21d1b5e375f1c5cb07576..6516dbec96cc3a8251d760b1d48f79dedfcea7cb 100644 (file)
@@ -134,8 +134,6 @@ src/include/radpaths.h: src/include/build-radpaths-h
 src/freeradius-devel:
        ${Q}[ -e $@ ] || ln -s include $@
        @echo LN-SF src/include src/freeradius-devel
-       ${Q}[ -e src/include/io ] || ln -s ${top_srcdir}/src/lib/io ${top_srcdir}/src/include
-       @echo LN-SF src/include/io src/freeradius-devel/io
 
 #
 #  Ensure we set up the build environment
diff --git a/src/include/ldap b/src/include/ldap
deleted file mode 120000 (symlink)
index 232d4d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../lib/ldap/
\ No newline at end of file
index c16adf0e0c79c09dff0094232c496deb034b4644..0fe0cf8f26edac6377dfa8530e3117a2c78d6c78 100644 (file)
@@ -1,6 +1,38 @@
-SUBMAKEFILES := \
-       io/all.mk \
-       ldap/all.mk \
-       soh/all.mk \
-       tls/all.mk \
-       util/all.mk
+#  Create the soft link for the protocol-specific include files
+#  before building the lib.
+#
+define LIB_INCLUDE
+#
+#  This is a hack to get the include files linked correctly.  We would
+#  LOVE to be able to do:
+#
+#      $${libfreeradius-${1}.la_OBJS}: | src/include/${1}
+#
+#  but GNU Make is too stupid to wait until that variable is defined
+#  to evaluate the condition.  Instead, it evaluates the rule
+#  immediately, and decides that nothing is there.
+#
+#  So, we instead depend on a targe which has already been defined.t
+#  - This is a terrible hack
+#
+src/freeradius-devel: | src/include/${1}
+
+src/include/${1}:
+       $${Q}[ -e $$@ ] || ln -sf $${top_srcdir}/src/lib/${1} $$@
+       @echo LN-SF src/lib/${1} $$@
+
+install.src.include: $(addprefix ${SRC_INCLUDE_DIR}/,${1}/${1}.h)
+endef
+
+
+#
+#  All lib go into subdirectories of the "lib" directory.
+#
+SUBMAKEFILES := $(wildcard ${top_srcdir}/src/lib/*/all.mk)
+
+#
+#  Add library-specific rules to link include files, etc.
+#
+$(foreach x,$(SUBMAKEFILES), \
+       $(eval $(call LIB_INCLUDE,$(subst /all.mk,,$(subst ${top_srcdir}/src/lib/,,$x)))) \
+)