From 61bb7a27543b9caa57e9cf39d9d10131d5af674d Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 11 Mar 2020 17:53:18 -0400 Subject: add debian/ added the deplist feature to Makefile to support debuild --- src/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') 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} -- cgit