shithub: riscv

ref: d5f2d2cc3fc7c2d3701e906df5d2d53781c4ee9c
dir: /sys/src/ape/cmd/mkfile/

View raw version
APE=/sys/src/ape
<$APE/config

TARG=basename\
	cc\
	cp\
	dirname\
	kill\
	mv\
	uname

DIRS=\
	diff\
	expr\
	make\
	patch\
	pdksh\
	sed\

BIN=$APEBIN
</sys/src/cmd/mkmany

CFLAGS=-c -D_POSIX_SOURCE

all:V:	$DIRS

install:V:	install.dir install.rc

installall:V:	installall.dir

clean:V:	clean.dir

nuke:V:		nuke.dir

%.dir:V:
	for (i in $DIRS) @{
		cd $i
		echo '----'$i'----'
		mk $stem
	}

$DIRS:V:
	for (i in $target) @{
		cd $i
		echo '----'$i'----'
		mk all
	}

cc.$O: cc.c
	mk -f /sys/src/cmd/mkfile cc.$O

$O.cc: cc.$O
	mk -f /sys/src/cmd/mkfile $O.cc

cp.$O: cp.c
	mk -f /sys/src/cmd/mkfile cp.$O

$O.cp: cp.$O
	mk -f /sys/src/cmd/mkfile $O.cp

mv.$O: mv.c
	mk -f /sys/src/cmd/mkfile mv.$O

$O.mv: mv.$O
	mk -f /sys/src/cmd/mkfile $O.mv

$BIN/%: %.rc
	cp -x $stem.rc $BIN/$stem

install.rc:V: $BIN/psh