summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2021-01-30 12:21:15 +0000
committerRoy Marples <roy@marples.name>2021-01-30 12:21:15 +0000
commit55df1b68f64049974ba7625553a1c8d72a20f716 (patch)
treecae275d08ccc97bed370e44b7c4d4ad8e87c6fcd
parentb29f653581bfd327a0a49c1015e8759dafc1cd1b (diff)
downloaddhcpcd-55df1b68f64049974ba7625553a1c8d72a20f716.tar.xz
import-src: Improve target so we don't create empty files
-rw-r--r--hooks/50-ypbind.in1
-rw-r--r--src/Makefile18
2 files changed, 7 insertions, 12 deletions
diff --git a/hooks/50-ypbind.in b/hooks/50-ypbind.in
index 09a12b97..6d55228c 100644
--- a/hooks/50-ypbind.in
+++ b/hooks/50-ypbind.in
@@ -7,7 +7,6 @@ ypbind_dir="$state_dir/ypbind"
: ${ypdomain_dir:=@YPDOMAIN_DIR@}
: ${ypdomain_suffix:=@YPDOMAIN_SUFFIX@}
-
best_domain()
{
for i in "$ypbind_dir/$interface_order".*; do
diff --git a/src/Makefile b/src/Makefile
index 65845988..28104b2e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -113,20 +113,15 @@ distclean: clean
_import-src: ${SRCS} ${MAN5} ${MAN8}
${INSTALL} -d ${DESTDIR}/src
- touch if-bsd.h if-linux.h if-sun.h
for x in defs.h ${SRCS} ${SRCS:.c=.h} dev.h ${MAN5} ${MAN8}; do \
- cp $$x ${DESTDIR}/src; \
+ [ ! -e "$$x" ] || cp $$x ${DESTDIR}/src; \
done
cp dhcpcd.conf ${DESTDIR}/src
- rm if-bsd.h if-linux.h if-sun.h
- rm -f ${DESTDIR}/src/if-bsd.h ${DESTDIR}/src/if-linux.h ${DESTDIR}/src/if-sun.h
if [ -n "${COMPAT_SRCS}" ]; then \
${INSTALL} -d ${DESTDIR}/compat; \
- cd ..; \
- touch compat/rb.h compat/strtou.h; \
- cp ${COMPAT_SRCS} ${COMPAT_SRCS:.c=.h} ${DESTDIR}/compat; \
- rm compat/rb.h compat/strtou.h; \
- rm -f ${DESTDIR}/compat/rb.h ${DESTDIR}/compat/strtou.h; \
+ for x in ${COMPAT_SRCS} ${COMPAT_SRCS:.c=.h}; do \
+ [ ! -e "../$$x" ] || cp "../$$x" ${DESTDIR}/compat; \
+ done; \
fi
if ! grep HAVE_SYS_BITOPS_H ../config.h; then \
cp ../compat/bitops.h ${DESTDIR}/compat; \
@@ -142,8 +137,9 @@ _import-src: ${SRCS} ${MAN5} ${MAN8}
fi
if [ -n "${CRYPT_SRCS}" ]; then \
${INSTALL} -d ${DESTDIR}/compat/crypt; \
- cd ..; \
- cp ${CRYPT_SRCS} ${CRYPT_SRCS:.c=.h} ${DESTDIR}/compat/crypt; \
+ for x in ${CRYPT_SRCS} ${CRYPT_SRCS:.c=.h}; do \
+ cp "../$$x" ${DESTDIR}/compat/crypt; \
+ done; \
fi
# DragonFlyBSD builds base version with private crypto
if [ `uname` = DragonFly ]; then rm ${DESTDIR}/compat/crypt/md5* ${DESTDIR}/compat/crypt/sha256*; fi