build: Add import-src target
authorRoy Marples <roy@marples.name>
Sun, 8 Sep 2019 18:04:09 +0000 (19:04 +0100)
committerRoy Marples <roy@marples.name>
Sun, 8 Sep 2019 18:04:09 +0000 (19:04 +0100)
Makefile

index 0bae4d5070acb549b7ccf915d6512147bf4d1f55..6cfa6e4ea07255424f9e42bcce4dc69b3175d2f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ SYSCONFDIR?=  /etc
 LIBEXECDIR?=   /libexec/resolvconf
 VARDIR?=       /var/run/resolvconf
 
+ECHO?=         echo
 INSTALL?=      install
 SED?=          sed
 
@@ -20,7 +21,7 @@ DOCMODE?=     0644
 MANMODE?=      0444
 
 RESOLVCONF=    resolvconf resolvconf.8 resolvconf.conf.5
-SUBSCRIBERS=   libc dnsmasq named pdnsd unbound
+SUBSCRIBERS=   libc dnsmasq named pdnsd pdns_recursor unbound
 TARGET=                ${RESOLVCONF} ${SUBSCRIBERS}
 SRCS=          ${TARGET:C,$,.in,} # pmake
 SRCS:=         ${TARGET:=.in} # gmake
@@ -103,3 +104,15 @@ import: dist
        rm -rf /tmp/${DISTPREFIX}
        ${INSTALL} -d /tmp/${DISTPREFIX}
        tar xvJpf ${DISTFILE} -C /tmp
+
+_import-src:
+       rm -rf ${DESTDIR}/*
+       ${INSTALL} -d ${DESTDIR}
+       cp LICENSE README.md ${SRCS} resolvconf.conf ${DESTDIR};
+       cp resolvconf.8.in resolvconf.conf.5.in ${DESTDIR};
+       @${ECHO}
+       @${ECHO} "============================================================="
+       @${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}"
+
+import-src:
+       ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else  echo /tmp/${DISTPREFIX}; fi`