Use buildsystem commands instead of {cp,mkdir}

This commit is contained in:
Thomas Veerman 2012-05-07 16:28:01 +02:00 committed by Thomas Veerman
parent 5daf8dbb89
commit d1301b26b3
4 changed files with 11 additions and 14 deletions

View 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

View 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

View 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

View 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.