]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove $(shell ...) and replace with $(wildcard ...)
authorAlan T. DeKok <aland@freeradius.org>
Wed, 27 Mar 2019 12:47:52 +0000 (08:47 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 Mar 2019 12:47:52 +0000 (08:47 -0400)
which is faster.  We should really avoid the use of $(shell),
and maybe replace it with a build/defs.mk file which is run
only once.

Makefile
src/include/all.mk

index 1d6a28fb44df54ed75435d0ceca1daef238de290..6817d37485ac9ae8bacec62035b552758976afe5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,11 @@ endif
 export DESTDIR := $(R)
 export PROJECT_NAME := freeradius
 
+#
+#  src/include/all.mk needs these, so define them before we include that file.
+#
+PROTOCOLS    := dhcpv4 eap freeradius snmp vqp dhcpv6 ethernet radius tacacs
+
 # And over-ride all of the other magic.
 ifneq "$(MAKECMDGOALS)" "deb"
 ifeq "$(findstring crossbuild,$(MAKECMDGOALS))" ""
@@ -117,7 +122,8 @@ endif
 #
 export DESTDIR := $(R)
 
-DICTIONARIES := $(shell find share/dictionary -type f -name dictionary*)
+DICTIONARIES := $(wildcard $(addsuffix /dictionary*,$(addprefix share/dictionary/,$(PROTOCOLS))))
+
 install.share: $(addprefix $(R)$(dictdir)/,$(patsubst share/dictionary/%,%,$(DICTIONARIES)))
 
 $(R)$(dictdir)/%: share/dictionary/%
index d03088818bad83048d14be69b05e93b5661a02f3..cbd84398750922c6c2855d998ff8a0208029c594 100644 (file)
@@ -38,13 +38,13 @@ src/include/autoconf.sed: src/include/autoconf.h
 #
 
 # Find the RFC dictionaries, and add them to the list to be converted
-DICT := $(shell find share/dictionary -type f -name *dictionary.rfc*)
+DICT := $(wildcard $(addsuffix /dictionary.rfc*,$(addprefix share/dictionary/,$(PROTOCOLS))))
 
-# Find internal dictionaries and add them to the list to be converted
-DICT += $(shell find share/dictionary -type f -name *dictionary.freeradius*)
+# Find internal dictionaries and add them to the list to be converte
+DICT += $(wildcard $(addsuffix /dictionary.freeradius*,$(addprefix share/dictionary/,$(PROTOCOLS))))
 
 # These contain the protocol number definitions
-DICT += $(shell find share/dictionary -type f -name *dictionary)
+DICT += $(wildcard $(addsuffix /dictionary,$(addprefix share/dictionary/,$(PROTOCOLS))))
 
 # Add in protocol specific dictionaries (should be done in proto_* modules?)
 DICT += share/dictionary/vqp/dictionary.vqp