aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile
index 44bdc0d..c48eefa 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -35,15 +35,25 @@ sedbin :=$(shell which sed)
sortbin :=$(shell which sort)
truebin :=$(shell which true)
lnbin :=$(shell which ln)
+xargsbin :=$(shell which xargs)
+uniqbin :=$(shell which uniq)
all:
${echobin} "No compilation in this package."
-.PHONY: clean install uninstall list
+.PHONY: clean install uninstall list deplist deplist_opts
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'
+deplist:
+ @if test -z "$(DISTRO)" ; then ${echobin} "Please run \`make deplist\` with DISTRO= one of: `make deplist_opts 2>&1 1>/dev/null | ${xargsbin}`. Aborted." ; exit 1 ; fi
+ @${grepbin} -h --exclude='Makefile' --exclude-dir='doc' -A5 -riIE dependencies $(SRCDIR) | ${awkbin} -v 'distro=$(DISTRO)' 'tolower($$0) ~ distro {$$1="";$$2="";print}' | ${awkbin} 'BEGIN{cmd="${xargsbin} -n1"} $$0 !~ /\(/{print $$0 | cmd ; close(cmd);} $$0 ~ /\(/{print;}' | ${sortbin} | ${uniqbin} | ${sedbin} -r -e 's/$$/$(SEPARATOR)/' | ${xargsbin}
+
+deplist_opts:
+ @${echobin} "el7" 1>&2
+ @${echobin} "devuan" 1>&2
+
install:
@${echobin} Installing files to ${DESTDIR}
${installbin} -d ${SBINDIR} ${DOCDIR} ${BINDIR} ${BINDIR1}
bgstack15