]> Zhao Yanbai Git Server - minix.git/commitdiff
Use buildsystem commands instead of {cp,mkdir}
authorThomas Veerman <tveerman@cs.vu.nl>
Mon, 7 May 2012 14:28:01 +0000 (16:28 +0200)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:33 +0000 (10:53 +0000)
drivers/ext2_ramdisk/Makefile
etc/Makefile
etc/usr/Makefile
tools/Makefile

index b58f1c4ad8e673e41b569e63753263b7b98cdcde..bb307196cee1e5a6c3ee0874a4adbf95690ec811 100644 (file)
@@ -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
index ee989063dac3cf5461e236dd45487cecd0a321d4..f57c65cee4599512e892336a5b73e3322ce75a16 100644 (file)
@@ -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
 
index 528da779d5d9a5939458f15dd0b0ecb705f2b770..7ecaa0f81bf18e3a10121af928a8018689ac01f9 100644 (file)
@@ -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
index 043d83da1e042a431f13541d1553eb5520e0cdf0..8a9da871c930a07881f97bd848de78efbab94efd 100644 (file)
@@ -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.