Changeset 1902

Show
Ignore:
Timestamp:
03/16/09 13:53:31 (3 years ago)
Author:
kjellm
Message:

Use "simply expanded variables". This makes make execute faster and easier to maintain

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Makefile

    r1895 r1902  
    88include Makefile.config 
    99 
    10 RELEASE          = $(shell cat RELEASE) 
     10RELEASE          := $(shell cat RELEASE) 
    1111INSTALL_PLUGINS ?= "auto manual contrib snmpauto" 
    12 INSTALL          = ./install-sh 
    13 DIR              = $(shell /bin/pwd | sed 's/^.*\///') 
    14 INFILES          = $(shell find . -name '*.in' | sed 's/\.\/\(.*\)\.in$$/build\/\1/') 
    15 PLUGINS          = $(wildcard node/node.d.$(OSTYPE)/* node/node.d/*) 
    16 MANCENTER        = "Munin Documentation" 
    17 MAN8             = node/munin-node node/munin-run \ 
     12INSTALL          := ./install-sh 
     13DIR              := $(shell /bin/pwd | sed 's/^.*\///') 
     14INFILES          := $(shell find . -name '*.in' | sed 's/\.\/\(.*\)\.in$$/build\/\1/') 
     15PLUGINS          := $(wildcard node/node.d.$(OSTYPE)/* node/node.d/*) 
     16MANCENTER        := "Munin Documentation" 
     17MAN8             := node/munin-node node/munin-run \ 
    1818                        node/munin-node-configure-snmp \ 
    1919                        node/munin-node-configure \ 
     
    2121                        server/munin-limits server/munin-html \ 
    2222                        server/munin-gather 
    23 PODMAN8          = server/munin-cron 
    24 PODMAN5          = server/munin.conf node/munin-node.conf 
     23PODMAN8          := server/munin-cron 
     24PODMAN5          := server/munin.conf node/munin-node.conf 
    2525 
    2626default: build 
     
    268268 
    269269 
    270  
    271  
    272  
    273270build/%: %.in 
    274271        @echo "$< -> $@" 
    275272        @mkdir -p build/`dirname $<` 
    276         @sed -e 's|@@PREFIX@@|$(PREFIX)|g'                     
    277            -e 's|@@CONFDIR@@|$(CONFDIR)|g'                     
    278            -e 's|@@BINDIR@@|$(BINDIR)|g'                       
    279            -e 's|@@SBINDIR@@|$(SBINDIR)|g'                     
    280            -e 's|@@DOCDIR@@|$(DOCDIR)|g'                       
    281            -e 's|@@LIBDIR@@|$(LIBDIR)|g'                       
    282            -e 's|@@MANDIR@@|$(MANDIR)|g'                       
    283            -e 's|@@LOGDIR@@|$(LOGDIR)|g'                       
    284            -e 's|@@HTMLDIR@@|$(HTMLDIR)|g'                     
    285            -e 's|@@DBDIR@@|$(DBDIR)|g'                         
    286            -e 's|@@STATEDIR@@|$(STATEDIR)|g'                   
    287            -e 's|@@PERL@@|$(PERL)|g'                           
    288            -e 's|@@PERLLIB@@|$(PERLLIB)|g'                     
    289            -e 's|@@PYTHON@@|$(PYTHON)|g'                       
    290            -e 's|@@OSTYPE@@|$(OSTYPE)|g'                       
    291            -e 's|@@HOSTNAME@@|$(HOSTNAME)|g'                   
    292            -e 's|@@MKTEMP@@|$(MKTEMP)|g'                       
    293            -e 's|@@VERSION@@|$(VERSION)|g'                     
    294            -e 's|@@PLUGSTATE@@|$(PLUGSTATE)|g'                 
    295            -e 's|@@CGIDIR@@|$(CGIDIR)|g'                       
    296            -e 's|@@USER@@|$(USER)|g'                           
    297            -e 's|@@GROUP@@|$(GROUP)|g'                         
    298            -e 's|@@PLUGINUSER@@|$(PLUGINUSER)|g'               
    299            -e 's|@@GOODSH@@|$(GOODSH)|g'                       
    300            -e 's|@@BASH@@|$(BASH)|g'                           
    301            -e 's|@@HASSETR@@|$(HASSETR)|g'                     
    302            -e 's|@@SSPOOLDIR@@|$(SSPOOLDIR)|g'                 
    303            $< > $@; 
     273        @sed -e 's|@@PREFIX@@|$(PREFIX)|g'                     
     274             -e 's|@@CONFDIR@@|$(CONFDIR)|g'                   
     275             -e 's|@@BINDIR@@|$(BINDIR)|g'                     
     276             -e 's|@@SBINDIR@@|$(SBINDIR)|g'                   
     277             -e 's|@@DOCDIR@@|$(DOCDIR)|g'                     
     278             -e 's|@@LIBDIR@@|$(LIBDIR)|g'                     
     279             -e 's|@@MANDIR@@|$(MANDIR)|g'                     
     280             -e 's|@@LOGDIR@@|$(LOGDIR)|g'                     
     281             -e 's|@@HTMLDIR@@|$(HTMLDIR)|g'                   
     282             -e 's|@@DBDIR@@|$(DBDIR)|g'                       
     283             -e 's|@@STATEDIR@@|$(STATEDIR)|g'                 
     284             -e 's|@@PERL@@|$(PERL)|g'                         
     285             -e 's|@@PERLLIB@@|$(PERLLIB)|g'                   
     286             -e 's|@@PYTHON@@|$(PYTHON)|g'                     
     287             -e 's|@@OSTYPE@@|$(OSTYPE)|g'                     
     288             -e 's|@@HOSTNAME@@|$(HOSTNAME)|g'                 
     289             -e 's|@@MKTEMP@@|$(MKTEMP)|g'                     
     290             -e 's|@@VERSION@@|$(VERSION)|g'                   
     291             -e 's|@@PLUGSTATE@@|$(PLUGSTATE)|g'               
     292             -e 's|@@CGIDIR@@|$(CGIDIR)|g'                     
     293             -e 's|@@USER@@|$(USER)|g'                         
     294             -e 's|@@GROUP@@|$(GROUP)|g'                       
     295             -e 's|@@PLUGINUSER@@|$(PLUGINUSER)|g'             
     296             -e 's|@@GOODSH@@|$(GOODSH)|g'                     
     297             -e 's|@@BASH@@|$(BASH)|g'                         
     298             -e 's|@@HASSETR@@|$(HASSETR)|g'                   
     299             -e 's|@@SSPOOLDIR@@|$(SSPOOLDIR)|g'               
     300             $< > $@; 
    304301 
    305302 
  • trunk/Makefile.config

    r1848 r1902  
    2222# Then override 
    2323 
    24 PREFIX     = $(DESTDIR)/usr 
    25 CONFDIR    = $(DESTDIR)/etc/munin 
    26 DOCDIR     = $(PREFIX)/share/doc/munin 
    27 MANDIR     = $(PREFIX)/share/man 
    28 SSPOOLDIR  = /tmp/muninspool 
     24PREFIX     := $(DESTDIR)/usr 
     25CONFDIR    := $(DESTDIR)/etc/munin 
     26DOCDIR     := $(PREFIX)/share/doc/munin 
     27MANDIR     := $(PREFIX)/share/man 
     28SSPOOLDIR  := /tmp/muninspool 
    2929 
    3030 
    3131# Where to put internal binaries and plugin repository 
    32 LIBDIR     = $(PREFIX)/share/munin 
     32LIBDIR     := $(PREFIX)/share/munin 
    3333 
    3434# Server only - Output directory 
    35 HTMLDIR    = /var/www/munin 
    36 CGIDIR     = $(HTMLDIR)/../cgi 
     35HTMLDIR    := /var/www/munin 
     36CGIDIR     := $(HTMLDIR)/../cgi 
    3737 
    3838# Client only - Where to put RRD files and other intenal data 
    39 DBDIR      = $(DESTDIR)/var/lib/munin 
     39DBDIR      := $(DESTDIR)/var/lib/munin 
    4040 
    4141# Client only - Where plugins should put their states. Must be writable by 
    4242# group "munin", and should be preserved between reboots 
    43 PLUGSTATE  = $(DBDIR)/plugin-state 
     43PLUGSTATE  := $(DBDIR)/plugin-state 
    4444 
    4545# Where Munin should place its logs. 
    46 LOGDIR     = $(DESTDIR)/var/log/munin 
     46LOGDIR     := $(DESTDIR)/var/log/munin 
    4747 
    4848# Location of PID files and other statefiles. On the server, must be 
    4949# writable by the user "munin". 
    50 STATEDIR   = $(DESTDIR)/var/run/munin 
     50STATEDIR   := $(DESTDIR)/var/run/munin 
    5151 
    5252# The perl interpreter to use 
    53 PERL       = $(shell which perl) 
     53PERL       := $(shell which perl) 
    5454 
    5555# The python interpreter to use (used by some plugins) 
    56 PYTHON     = /usr/bin/env python 
     56PYTHON     := /usr/bin/env python 
    5757 
    5858# A modern shell.  We're not looking for arrays, but $() and other modern 
     
    6161# SunOS/Solaris: /usr/xpg4/bin/sh or /bin/ksh 
    6262# In general: bash or ksh will work 
    63 GOODSH     = /bin/bash 
     63GOODSH     := /bin/bash 
    6464 
    6565# Path of bash for bash specific plugins 
    66 BASH       = /bin/bash 
     66BASH       := /bin/bash 
    6767 
    6868# Where to install the perl libraries 
    69 PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
     69PERLLIB    := $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
    7070 
    7171# Client only - Install plugins for this architecture 
    72 OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]') 
     72OSTYPE     := $(shell uname | tr '[A-Z]' '[a-z]') 
    7373 
    7474# How to figure out the hostname. (Only used in default configuration 
    7575# files) 
    76 HOSTNAME   = $(shell hostname) 
     76HOSTNAME   := $(shell hostname) 
    7777 
    7878# What is the safest way to create a tempfile. 
    7979# Default is to figure it out by testing various methods. 
    8080# Replace this with a known platform-specific method 
    81 MKTEMP     = $(shell ./test-mktemp) 
     81MKTEMP     := $(shell ./test-mktemp) 
    8282 
    8383# Munin version number. 
    84 VERSION    = $(shell ./getversion) 
     84VERSION    := $(shell ./getversion) 
    8585 
    8686# User to run munin as 
    87 USER       = munin 
    88 GROUP      = munin 
     87USER       := munin 
     88GROUP      := munin 
    8989 
    9090# Default user to run the plugins as 
    91 PLUGINUSER = nobody 
     91PLUGINUSER := nobody 
    9292 
    9393# Which command to use to check if the USER and GROUP to run Munin as, exists. 
    9494 
    95 GETENT = $(shell which getent || which true 2>/dev/null) 
    96 CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    97 CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     95GETENT     := $(shell which getent || which true 2>/dev/null) 
     96CHECKUSER  := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     97CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    9898 
    99 CHOWN      = chown 
    100 CHMOD      = chmod 
    101 CHGRP      = chgrp 
     99CHOWN      := chown 
     100CHMOD      := chmod 
     101CHGRP      := chgrp 
  • trunk/Makefile.config-dist

    r1881 r1902  
    1414# the base of the Munin installation. 
    1515#  
    16 PREFIX     = $(DESTDIR)/opt/munin 
     16PREFIX     := $(DESTDIR)/opt/munin 
    1717 
    1818# Where Munin keeps its configurations (server.conf, client.conf, ++) 
    19 CONFDIR    = $(DESTDIR)/etc/opt/munin 
     19CONFDIR    := $(DESTDIR)/etc/opt/munin 
    2020 
    2121# Server only - where to put munin-cron 
    22 BINDIR     = $(PREFIX)/bin 
     22BINDIR     := $(PREFIX)/bin 
    2323 
    2424# Client only - where to put munin-node, munin-node-configure, and munin-run 
    25 SBINDIR    = $(PREFIX)/sbin 
     25SBINDIR    := $(PREFIX)/sbin 
    2626 
    2727# Where to put text and html documentation 
    28 DOCDIR     = $(PREFIX)/doc 
     28DOCDIR     := $(PREFIX)/doc 
    2929 
    3030# Where to put man pages 
    31 MANDIR     = $(PREFIX)/man 
     31MANDIR     := $(PREFIX)/man 
    3232 
    3333# Where to put internal binaries and plugin repository 
    34 LIBDIR     = $(PREFIX)/lib 
     34LIBDIR     := $(PREFIX)/lib 
    3535 
    3636# Server only - Output directory 
    37 HTMLDIR    = $(PREFIX)/var/www 
    38 CGIDIR     = $(HTMLDIR)/cgi 
     37HTMLDIR    := $(PREFIX)/var/www 
     38CGIDIR     := $(HTMLDIR)/cgi 
    3939 
    4040# Server only - spool directory for data gathered from nodes by 
     
    4343# /tmp will be a ramdisk. 
    4444 
    45 SSPOOLDIR  = $(PREFIX)/spool 
     45SSPOOLDIR  := $(PREFIX)/spool 
    4646 
    4747# Suggested directory name for a pulic ramdisk based tmp directory. 
    48 # SSPOOLDIR = /tmp/muninspool 
     48# SSPOOLDIR := /tmp/muninspool 
    4949 
    5050# Client only - Where to put RRD files and other intenal data 
    51 DBDIR      = $(DESTDIR)/var/opt/munin 
     51DBDIR      := $(DESTDIR)/var/opt/munin 
    5252 
    5353# Client only - Where plugins should put their states. Must be writable by 
    5454# group "munin", and should be preserved between reboots 
    55 PLUGSTATE  = $(DBDIR)/plugin-state 
     55PLUGSTATE  := $(DBDIR)/plugin-state 
    5656 
    5757# Where Munin should place its logs. 
    58 LOGDIR     = $(DESTDIR)/var/log/munin 
     58LOGDIR     := $(DESTDIR)/var/log/munin 
    5959 
    6060# Location of PID files and other statefiles. On the server, must be 
    6161# writable by the user "munin". 
    62 STATEDIR   = $(DESTDIR)/var/run/munin 
     62STATEDIR   := $(DESTDIR)/var/run/munin 
    6363 
    6464# The perl interpreter to use 
    65 PERL       = $(shell which perl) 
     65PERL       := $(shell which perl) 
    6666 
    6767# The python interpreter to use (used by some plugins) 
    68 PYTHON     = /usr/bin/env python 
     68PYTHON     := /usr/bin/env python 
    6969 
    7070# A modern (posix) shell.  We're not looking for arrays, but $() and 
     
    7676# In general: bash or ksh will work 
    7777# 
    78 GOODSH     = $(shell PATH=`getconf PATH` sh -c 'type sh | sed "s/.* //"') 
     78GOODSH     := $(shell PATH=`getconf PATH` sh -c 'type sh | sed "s/.* //"') 
    7979 
    8080# Path of bash for bash specific plugins 
    81 BASH       = /bin/bash 
     81BASH       := /bin/bash 
    8282 
    8383# Server only - Where to install the perl libraries 
    84 PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
     84PERLLIB    := $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
    8585 
    8686# Client only - Install plugins for this architecture 
    87 OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]') 
     87OSTYPE     := $(shell uname | tr '[A-Z]' '[a-z]') 
    8888 
    8989# How to figure out the hostname. (Only used in default configuration 
    9090# files) 
    91 HOSTNAME   = $(shell hostname) 
     91HOSTNAME   := $(shell hostname) 
    9292 
    9393# What is the safest way to create a tempfile. 
    9494# Default is to figure it out by testing various methods. 
    9595# Replace this with a known platform-specific method 
    96 MKTEMP     = $(shell ./test-mktemp) 
     96MKTEMP     := $(shell ./test-mktemp) 
    9797 
    9898# Munin version number. 
    99 VERSION    = $(shell ./getversion) 
     99VERSION    := $(shell ./getversion) 
    100100 
    101101# User to run munin as 
    102 USER       = munin 
    103 GROUP      = munin 
     102USER       := munin 
     103GROUP      := munin 
    104104 
    105105# Default user to run the plugins as 
    106 PLUGINUSER = nobody 
     106PLUGINUSER := nobody 
    107107 
    108108# Which command to use to check if the USER and GROUP to run Munin as, exists. 
    109109# These will work on most modern OSes: 
    110110# 
    111 GETENT = $(shell which getent || which true 2>/dev/null) 
    112 CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    113 CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     111GETENT     := $(shell which getent || which true 2>/dev/null) 
     112CHECKUSER  := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     113CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    114114 
    115115# For OSX, comment out the previous two lines and comment in these 
    116116# 
    117 #CHECKUSER  = $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    118 #CHECKGROUP = $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     117#CHECKUSER  := $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     118#CHECKGROUP := $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    119119 
    120120# For OSX 10.5 (Leopard), use the following two lines instead of what's above 
    121121# 
    122 #CHECKUSER  = $(shell dscl . -read /Users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    123 #CHECKGROUP = $(shell dscl . -read /Groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     122#CHECKUSER  := $(shell dscl . -read /Users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     123#CHECKGROUP := $(shell dscl . -read /Groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    124124 
    125125 
    126126# For HP-UX, use these instead: 
    127127# 
    128 #CHECKUSER  = $(shell pwget -n $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    129 #CHECKGROUP = $(shell grget -n $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     128#CHECKUSER  := $(shell pwget -n $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     129#CHECKGROUP := $(shell grget -n $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    130130 
    131 CHOWN      = chown 
    132 CHMOD      = chmod 
    133 CHGRP      = chgrp 
     131CHOWN      := chown 
     132CHMOD      := chmod 
     133CHGRP      := chgrp 
    134134 
    135135# Check whether setruid functionality can be used 
    136 HASSETR = $(shell perl -e 'use Config; my @vars=("d_setruid", "d_setreuid", "d_setresuid"); foreach my $$var (@vars) { if ($$Config{$$var} eq "define") { print "1\n"; exit 0; } } print "0\n"; exit 0;' ) 
     136HASSETR    := $(shell perl -e 'use Config; my @vars=("d_setruid", "d_setreuid", "d_setresuid"); foreach my $$var (@vars) { if ($$Config{$$var} eq "define") { print "1\n"; exit 0; } } print "0\n"; exit 0;' ) 
  • trunk/Makefile.config-maint

    r1751 r1902  
    2222# Then override 
    2323 
    24 PREFIX     = $(DESTDIR)/usr 
    25 CONFDIR    = $(DESTDIR)/etc/munin 
    26 DOCDIR     = $(PREFIX)/share/doc/munin 
    27 MANDIR     = $(PREFIX)/share/man 
    28 SSPOOLDIR  = /tmp/muninspool 
     24PREFIX     := $(DESTDIR)/usr 
     25CONFDIR    := $(DESTDIR)/etc/munin 
     26DOCDIR     := $(PREFIX)/share/doc/munin 
     27MANDIR     := $(PREFIX)/share/man 
     28SSPOOLDIR  := /tmp/muninspool 
    2929 
    3030 
    3131# Where to put internal binaries and plugin repository 
    32 LIBDIR     = $(PREFIX)/share/munin 
     32LIBDIR     := $(PREFIX)/share/munin 
    3333 
    3434# Server only - Output directory 
    35 HTMLDIR    = /var/www/munin 
    36 CGIDIR     = $(HTMLDIR)/../cgi 
     35HTMLDIR    := /var/www/munin 
     36CGIDIR     := $(HTMLDIR)/../cgi 
    3737 
    3838# Client only - Where to put RRD files and other intenal data 
    39 DBDIR      = $(DESTDIR)/var/lib/munin 
     39DBDIR      := $(DESTDIR)/var/lib/munin 
    4040 
    4141# Client only - Where plugins should put their states. Must be writable by 
    4242# group "munin", and should be preserved between reboots 
    43 PLUGSTATE  = $(DBDIR)/plugin-state 
     43PLUGSTATE  := $(DBDIR)/plugin-state 
    4444 
    4545# Where Munin should place its logs. 
    46 LOGDIR     = $(DESTDIR)/var/log/munin 
     46LOGDIR     := $(DESTDIR)/var/log/munin 
    4747 
    4848# Location of PID files and other statefiles. On the server, must be 
    4949# writable by the user "munin". 
    50 STATEDIR   = $(DESTDIR)/var/run/munin 
     50STATEDIR   := $(DESTDIR)/var/run/munin 
    5151 
    5252# The perl interpreter to use 
    53 PERL       = $(shell which perl) 
     53PERL       := $(shell which perl) 
    5454 
    5555# The python interpreter to use (used by some plugins) 
    56 PYTHON     = /usr/bin/env python 
     56PYTHON     := /usr/bin/env python 
    5757 
    5858# A modern shell.  We're not looking for arrays, but $() and other modern 
     
    6161# SunOS/Solaris: /usr/xpg4/bin/sh or /bin/ksh 
    6262# In general: bash or ksh will work 
    63 GOODSH     = /bin/bash 
     63GOODSH     := /bin/bash 
    6464 
    6565# Path of bash for bash specific plugins 
    66 BASH       = /bin/bash 
     66BASH       := /bin/bash 
    6767 
    6868# Server only - Where to install the perl libraries 
    69 PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
     69PERLLIB    := $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 
    7070 
    7171# Client only - Install plugins for this architecture 
    72 OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]') 
     72OSTYPE     := $(shell uname | tr '[A-Z]' '[a-z]') 
    7373 
    7474# How to figure out the hostname. (Only used in default configuration 
    7575# files) 
    76 HOSTNAME   = $(shell hostname) 
     76HOSTNAME   := $(shell hostname) 
    7777 
    7878# What is the safest way to create a tempfile. 
    7979# Default is to figure it out by testing various methods. 
    8080# Replace this with a known platform-specific method 
    81 MKTEMP     = $(shell ./test-mktemp) 
     81MKTEMP     := $(shell ./test-mktemp) 
    8282 
    8383# Munin version number. 
    84 VERSION    = $(shell ./getversion) 
     84VERSION    := $(shell ./getversion) 
    8585 
    8686# User to run munin as 
    87 USER       = munin 
    88 GROUP      = munin 
     87USER       := munin 
     88GROUP      := munin 
    8989 
    9090# Default user to run the plugins as 
    91 PLUGINUSER = nobody 
     91PLUGINUSER := nobody 
    9292 
    9393# Which command to use to check if the USER and GROUP to run Munin as, exists. 
    9494 
    95 GETENT = $(shell which getent || which true 2>/dev/null) 
    96 CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
    97 CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
     95GETENT     := $(shell which getent || which true 2>/dev/null) 
     96CHECKUSER  := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 
     97CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 
    9898 
    99 CHOWN      = chown 
    100 CHMOD      = chmod 
    101 CHGRP      = chgrp 
     99CHOWN      := chown 
     100CHMOD      := chmod 
     101CHGRP      := chgrp