SRCDIR = ../../src
SINGLETONS = \
+ $(addprefix args-, argc argv0 argvn single multiple dbl-space) \
+ $(addprefix sc-, bad-sp bad-arg boundary) \
+ halt exit \
$(addprefix create-, normal empty null bad-ptr long exists bound) \
- $(addprefix args-, argc argv0 argvn single multiple dbl-space)
+ $(addprefix open-, normal missing boundary empty null bad-ptr twice) \
+ $(addprefix close-, normal twice stdin stdout bad-fd) \
+ $(addprefix read-, normal bad-ptr boundary zero stdout bad-fd)
define SINGLETON_PROG
PROGS += $(1)
-$(1)_SRC = $(1).c
+$(subst -,_,$(1))_SRC = $(1).c
endef
$(foreach prog,$(SINGLETONS),$(eval $(call SINGLETON_PROG,$(prog))))
disks: $(DISKS)
-PINTOS = ../../src/utils/pintos
-OS_DISK = ../../src/userprog/build/os.dsk
%.dsk: %
- rm -f $@.tmp
- $(PINTOS) make-disk $@.tmp 2
- $(PINTOS) -v --os-disk=$(OS_DISK) --fs-disk=$@.tmp run -f -q
- $(PINTOS) -v --os-disk=$(OS_DISK) --fs-disk=$@.tmp put $<
- mv $@.tmp $@
+ ./prep-disk $<
clean::
rm -f $(DISKS)