"Fossies" - the Fresh Open Source Software Archive

Member "freeradius-server-3.0.23/raddb/all.mk" (10 Jun 2021, 5499 Bytes) of package /linux/misc/freeradius-server-3.0.23.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "all.mk": 3.0.22_vs_3.0.23.

    1 #
    2 #  The list of files to install.
    3 #
    4 LOCAL_FILES :=      clients.conf dictionary templates.conf experimental.conf \
    5             proxy.conf radiusd.conf trigger.conf README.rst panic.gdb
    6 
    7 DEFAULT_SITES :=    default inner-tunnel
    8 LOCAL_SITES :=      $(addprefix raddb/sites-enabled/,$(DEFAULT_SITES))
    9 
   10 DEFAULT_MODULES :=  always attr_filter cache_eap chap date \
   11             detail detail.log digest dynamic_clients eap \
   12             echo exec expiration expr files linelog logintime \
   13             mschap ntlm_auth pap passwd preprocess radutmp realm \
   14             replicate soh sradutmp totp unix unpack utf8
   15 
   16 LOCAL_MODULES :=    $(addprefix raddb/mods-enabled/,$(DEFAULT_MODULES))
   17 
   18 LOCAL_CERT_FILES := Makefile README.md xpextensions \
   19             ca.cnf server.cnf inner-server.cnf \
   20             client.cnf bootstrap
   21 
   22 #
   23 #  We don't create the installed certs if we're building a package,
   24 #  OR if OpenSSL is not available.
   25 #
   26 ifeq "$(PACKAGE)" ""
   27 ifneq "$(OPENSSL_LIBS)" ""
   28 LOCAL_CERT_PRODUCTS :=  $(addprefix $(R)$(raddbdir)/certs/,ca.key ca.pem \
   29             client.key client.pem server.key server.pem)
   30 endif
   31 endif
   32 
   33 LEGACY_LINKS :=     $(addprefix $(R)$(raddbdir)/,users huntgroups hints)
   34 
   35 RADDB_DIRS :=       certs mods-available mods-enabled policy.d \
   36             sites-available sites-enabled \
   37             $(patsubst raddb/%,%,$(shell find raddb/mods-config -type d -print))
   38 
   39 # Installed directories
   40 INSTALL_RADDB_DIRS :=   $(R)$(raddbdir)/ $(addprefix $(R)$(raddbdir)/, $(RADDB_DIRS))
   41 
   42 # Grab files from the various subdirectories
   43 INSTALL_FILES :=    $(wildcard raddb/sites-available/* raddb/mods-available/*) \
   44             $(addprefix raddb/,$(LOCAL_FILES)) \
   45             $(addprefix raddb/certs/,$(LOCAL_CERT_FILES)) \
   46             $(shell find raddb/mods-config -type f -print) \
   47             $(shell find raddb/policy.d -type f -print)
   48 
   49 # Re-write local files to installed files, filtering out editor backups
   50 INSTALL_RADDB :=    $(patsubst raddb/%,$(R)$(raddbdir)/%,\
   51             $(filter-out %~,$(INSTALL_FILES)))
   52 
   53 all: build.raddb
   54 
   55 build.raddb: $(LOCAL_SITES) $(LOCAL_MODULES)
   56 
   57 clean: clean.raddb
   58 
   59 install: install.raddb
   60 
   61 # Local build rules
   62 raddb/sites-enabled raddb/mods-enabled:
   63     @echo INSTALL $@
   64     @$(INSTALL) -d -m 750 $@
   65 
   66 # Set up the default modules for running in-source builds
   67 raddb/mods-enabled/%: raddb/mods-available/% | raddb/mods-enabled
   68     @echo "LN-S $@"
   69     @cd $(dir $@) && ln -sf ../mods-available/$(notdir $@)
   70 
   71 # Set up the default sites for running in-source builds
   72 raddb/sites-enabled/%: raddb/sites-available/% | raddb/sites-enabled
   73     @echo "LN-S $@"
   74     @cd $(dir $@) && ln -sf ../sites-available/$(notdir $@)
   75 
   76 # Installation rules for directories.  Note permissions are 750!
   77 $(INSTALL_RADDB_DIRS):
   78     @echo INSTALL $(patsubst $(R)$(raddbdir)%,raddb%,$@)
   79     @$(INSTALL) -d -m 750 $@
   80 
   81 #  The installed files have ORDER dependencies.  This means that they
   82 #  will be installed if the target doesn't exist.  And they won't be
   83 #  installed if the target already exists, even if it is out of date.
   84 #
   85 #  This dependency lets us install the server on top of an existing
   86 #  system, hopefully without breaking anything.
   87 
   88 ifeq "$(wildcard $(R)$(raddbdir)/mods-available/)" ""
   89 INSTALL_RADDB +=    $(patsubst raddb/%,$(R)$(raddbdir)/%,\
   90             $(filter-out %~,$(LOCAL_MODULES)))
   91 
   92 # Installation rules for mods-enabled.  Note ORDER dependencies
   93 $(R)$(raddbdir)/mods-enabled/%: | $(R)$(raddbdir)/mods-available/%
   94     @cd $(dir $@) && ln -sf ../mods-available/$(notdir $@)
   95 endif
   96 
   97 ifeq "$(wildcard $(R)$(raddbdir)/sites-available/)" ""
   98 INSTALL_RADDB +=    $(patsubst raddb/%,$(R)$(raddbdir)/%,\
   99             $(filter-out %~,$(LOCAL_SITES)))
  100 
  101 # Installation rules for sites-enabled.  Note ORDER dependencies
  102 $(R)$(raddbdir)/sites-enabled/%: | $(R)$(raddbdir)/sites-available/%
  103     @cd $(dir $@) && ln -sf ../sites-available/$(notdir $@)
  104 endif
  105 
  106 # Installation rules for plain modules.
  107 $(R)$(raddbdir)/%: | raddb/%
  108     @echo INSTALL $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  109     @$(INSTALL) -m 640 $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) $@
  110 
  111 # Create symbolic links for legacy files
  112 $(R)$(raddbdir)/huntgroups: $(R)$(modconfdir)/preprocess/huntgroups
  113     @[ -e $@ ] || echo LN-S $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  114     @[ -e $@ ] || ln -s $(patsubst $(R)$(raddbdir)/%,./%,$<) $@
  115 
  116 $(R)$(raddbdir)/hints: $(R)$(modconfdir)/preprocess/hints
  117     @[ -e $@ ] || echo LN-S $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  118     @[ -e $@ ] || ln -s $(patsubst $(R)$(raddbdir)/%,./%,$<) $@
  119 
  120 $(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize
  121     @[ -e $@ ] || echo LN-S $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  122     @[ -e $@ ] || ln -s $(patsubst $(R)$(raddbdir)/%,./%,$<) $@
  123 
  124 ifneq "$(LOCAL_CERT_PRODUCTS)" ""
  125 $(LOCAL_CERT_PRODUCTS):
  126     @echo BOOTSTRAP raddb/certs/
  127     @$(MAKE) -C $(R)$(raddbdir)/certs/
  128 
  129 # Bootstrap is special
  130 $(R)$(raddbdir)/certs/bootstrap: | raddb/certs/bootstrap $(LOCAL_CERT_PRODUCTS)
  131     @echo INSTALL $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  132     @$(INSTALL) -m 750 $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) $@
  133 else
  134 $(R)$(raddbdir)/certs/bootstrap:
  135     @echo INSTALL $(patsubst $(R)$(raddbdir)/%,raddb/%,$@)
  136     @$(INSTALL) -m 750 $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) $@
  137 endif
  138 
  139 #  List directories before the file targets.
  140 #  It's not clear why GNU Make doesn't deal well with this.
  141 install.raddb: | $(INSTALL_RADDB_DIRS) $(INSTALL_RADDB) $(LEGACY_LINKS)
  142 
  143 clean.raddb:
  144     @rm -f *~ $(addprefix raddb/sites-enabled/,$(DEFAULT_SITES)) \
  145         $(addprefix raddb/mods-enabled/,$(DEFAULT_MODULES))
  146 
  147 #
  148 #  A handy target to find out which triggers are where.
  149 #  Should only be run by SNMP developers.
  150 #
  151 triggers:
  152     @grep exec_trigger `find src -name "*.c" -print` | grep '"' | sed -e 's/.*,//' -e 's/ *"//' -e 's/");.*//'