From d1301b26b3ec42151375238e5bb809e1c46eefb5 Mon Sep 17 00:00:00 2001 From: Thomas Veerman Date: Mon, 7 May 2012 16:28:01 +0200 Subject: [PATCH] Use buildsystem commands instead of {cp,mkdir} --- drivers/ext2_ramdisk/Makefile | 4 ++-- etc/Makefile | 8 ++++---- etc/usr/Makefile | 2 +- tools/Makefile | 11 ++++------- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/ext2_ramdisk/Makefile b/drivers/ext2_ramdisk/Makefile index b58f1c4ad..bb307196c 100644 --- a/drivers/ext2_ramdisk/Makefile +++ b/drivers/ext2_ramdisk/Makefile @@ -39,8 +39,8 @@ install_files: image.d: install_files @echo -n "preparing image... " rm -rf image.d - @mkdir image.d - @for f in $(IMAGE_DIRS); do mkdir -p image.d/$$f; done + ${INSTALL_DIR} image.d + @for f in $(IMAGE_DIRS); do ${INSTALL_DIR} image.d/$$f; done @for f in $(BINFILES); do cp $(DESTDIR)/bin/$$f image.d/bin; done @for f in $(SBINFILES); do cp $(DESTDIR)/sbin/$$f image.d/sbin; done @for f in $(ETCFILES); do cp $(DESTDIR)/etc/$$f image.d/etc; done diff --git a/etc/Makefile b/etc/Makefile index ee989063d..f57c65cee 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -34,8 +34,8 @@ clean:: install: installpw # installpw needed to bootstrap pw db @echo "Installing /etc, /usr/etc and /usr/lib.." - mkdir -p $(ETC) $(USRLIB) - mkdir -p $(ETC)/devmand/scripts + ${INSTALL_DIR} $(ETC) + ${INSTALL_DIR} $(ETC)/devmand/scripts @echo "Making hierarchy.." sh mtree.sh mtree/minix.tree ${TOOL_AWK} ${TOOL_STAT} ${MKUNPRIVED} ${DESTDIR}; # DESTDIR must be last; special case! @for f in $(FILES1); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 755 $(ETC)/$$f; fi; done @@ -49,14 +49,14 @@ install: installpw # installpw needed to bootstrap pw db fi ${INSTALL_FILE} -o root -g operator -m 755 crontab ${DESTDIR}/usr/lib @echo "Making user homedirs.." - for u in ${DESTDIR}/usr/ast ${DESTDIR}/root; do mkdir -p $$u; cp ast/.[aepv]* $$u ; done + for u in ${DESTDIR}/usr/ast ${DESTDIR}/root; do ${INSTALL_DIR} $$u; cp ast/.[aepv]* $$u ; done @echo "Installing fonts.." ${INSTALL_FILE} -m 644 -o root -g operator fonts/*.fnt ${DESTDIR}/usr/lib/fonts/ installforce:: $(ETC)/rc $(ETC)/rs.inet $(ETC)/rs.single $(ETC)/system.conf $(ETC)/rc.subr.minix $(USRETC)/rc $(USR)/Makefile installpw installpw:: - if [ ! -d $(ETC) ]; then mkdir $(ETC); chmod 755 $(ETC); fi + if [ ! -d $(ETC) ]; then ${INSTALL_DIR} $(ETC); chmod 755 $(ETC); fi @for f in $(PWFILES); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 600 $(ETC)/$$f; fi; done touch ${ETC}/pwd.db; touch ${ETC}/spwd.db; ${TOOL_PWD_MKDB} -d ${ETC}/.. -p -V 0 ${ETC}/master.passwd diff --git a/etc/usr/Makefile b/etc/usr/Makefile index 528da779d..7ecaa0f81 100644 --- a/etc/usr/Makefile +++ b/etc/usr/Makefile @@ -23,7 +23,7 @@ help all: pkgsrc-create: git @echo "If problems occur you may have to rm -rf pkgsrc and try again." @echo "" - mkdir -p ${.CURDIR}/pkgsrc + ${INSTALL_DIR} ${.CURDIR}/pkgsrc cd ${.CURDIR}/pkgsrc && git init cd ${.CURDIR}/pkgsrc && \ git remote add origin git://git.minix3.org/pkgsrc.git diff --git a/tools/Makefile b/tools/Makefile index 043d83da1..8a9da871c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -76,7 +76,7 @@ bootable: hdboot: rm -rf ${DESTDIR}/boot/minix/.temp/ - mkdir -p ${DESTDIR}/boot/minix/.temp + ${INSTALL_DIR} {DESTDIR}/boot/minix/.temp # mod_0 is used to make alphabetical order equal to the boot order for i in ${PROGRAMS}; \ do \ @@ -103,21 +103,18 @@ install: fi cross_install: - if [ ! -d ${DESTDIR}/multiboot ] ; \ - then\ - mkdir ${DESTDIR}/multiboot;\ - fi + ${INSTALL_DIR} ${DESTDIR}/multiboot #ext2 might be needed for i in ${PROGRAMS} ../servers/ext2/ext2; \ do \ let n=n+1 >/dev/null; \ [ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \ newname="${DESTDIR}/multiboot/$${prefix}$${n}_`basename $$i`"; \ - cp $$i $$newname; \ + ${INSTALL} $$i $$newname; \ strip -s $$newname; \ gzip -f $$newname; \ done - cp ../kernel/kernel ${DESTDIR}/multiboot/ + ${INSTALL} ../kernel/kernel ${DESTDIR}/multiboot/ strip -s ${DESTDIR}/multiboot/kernel # download and update NetBSD reference sources.