../Makefile: ../Makefile.in substitutions.sed substitute.sh ./substitute.sh ../Makefile.in ../Makefile substitutions.sed: substitutions.conf sed -n -E \ -e 's@^[[:space:]]*#.*@@' \ -e 's@!@\\!@g' \ -e 's@^([[:alnum:]_]+) *(.*)@s!%%\1%%!\2!g@p' \ substitutions.conf > $@ substitutions.conf: substitutions.conf.default substitutions.conf.local cp -p substitutions.conf.local $@ awk '{ print $$1 }' substitutions.conf.local | fgrep -v -h -f - substitutions.conf.default >> $@ substitutions.conf.default: substitutions.conf.franchise substitutions.conf.FreeBSD substitutions.conf.Linux cat substitutions.conf.franchise substitutions.conf.`uname` > $@ substitutions.conf.local: [ -e $@ ] || \ { ETC_CONF=`sed -n -E -e 's/^ETC_DIR[[:space:]]+(.*)$$/\1/p' substitutions.conf.default | head -n 1`/nodes2grafana.conf ; \ if [ -e $$ETC_CONF ] ; then ln -s $$ETC_CONF $@ ; else touch $@ ; fi ; } clean: rm -f substitutions.sed substitutions.conf substitutions.conf.default [ -L substitutions.conf.local ] && rm -f substitutions.conf.local || [ -s substitutions.conf.local ] || rm -f substitutions.conf.local