X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Fuserprog%2FMakefile;h=225180f73f7a3bf81a00609d4f23e75e2acb45e6;hb=5780c9f434cca090f88463b7f0199d49b4ded288;hp=e49f6d6ee53a146bbe6d990b22e646b5ad8ebd12;hpb=bd7bad8e3881965f74070ce7b685fedbdaf8fb1c;p=pintos-anon diff --git a/grading/userprog/Makefile b/grading/userprog/Makefile index e49f6d6..225180f 100644 --- a/grading/userprog/Makefile +++ b/grading/userprog/Makefile @@ -1,38 +1,93 @@ -SRCDIR = ../../src +# This file is automatically generated from Make.base and Make.tests +# by mkmf. Do not modify! -# Main test programs. TESTS = \ - $(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 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) \ - $(addprefix write-, normal bad-ptr boundary zero stdin bad-fd) \ - $(addprefix exec-, once arg multiple missing bad-ptr) \ - $(addprefix join-, simple twice killed bad-pid) \ - $(addprefix multi-, recurse oom child-fd) - -define TEST_PROG -PROGS += $(1) -$(subst -,_,$(1))_SRC = $(1).c -endef - -$(foreach prog,$(TESTS),$(eval $(call TEST_PROG,$(prog)))) -DISKS = $(patsubst %,%.dsk,$(PROGS)) + args-argc args-argv0 args-argvn args-single args-multiple \ + args-dbl-space sc-bad-sp sc-bad-arg sc-boundary halt exit \ + create-normal create-empty create-null create-bad-ptr create-long \ + create-exists create-bound open-normal open-missing open-boundary \ + open-empty open-null open-bad-ptr open-twice close-normal \ + close-twice close-stdin close-stdout close-bad-fd read-normal \ + read-bad-ptr read-boundary read-zero read-stdout read-bad-fd \ + write-normal write-bad-ptr write-boundary write-zero write-stdin \ + write-bad-fd exec-once exec-arg exec-multiple exec-missing \ + exec-bad-ptr wait-simple wait-twice wait-killed wait-bad-pid \ + multi-recurse multi-oom multi-child-fd +args_argc_SRC = args-argc.c +args_argv0_SRC = args-argv0.c +args_argvn_SRC = args-argvn.c +args_single_SRC = args-single.c +args_multiple_SRC = args-multiple.c +args_dbl_space_SRC = args-dbl-space.c +sc_bad_sp_SRC = sc-bad-sp.c +sc_bad_arg_SRC = sc-bad-arg.c +sc_boundary_SRC = sc-boundary.c +halt_SRC = halt.c +exit_SRC = exit.c +create_normal_SRC = create-normal.c +create_empty_SRC = create-empty.c +create_null_SRC = create-null.c +create_bad_ptr_SRC = create-bad-ptr.c +create_long_SRC = create-long.c +create_exists_SRC = create-exists.c +create_bound_SRC = create-bound.c +open_normal_SRC = open-normal.c +open_missing_SRC = open-missing.c +open_boundary_SRC = open-boundary.c +open_empty_SRC = open-empty.c +open_null_SRC = open-null.c +open_bad_ptr_SRC = open-bad-ptr.c +open_twice_SRC = open-twice.c +close_normal_SRC = close-normal.c +close_twice_SRC = close-twice.c +close_stdin_SRC = close-stdin.c +close_stdout_SRC = close-stdout.c +close_bad_fd_SRC = close-bad-fd.c +read_normal_SRC = read-normal.c +read_bad_ptr_SRC = read-bad-ptr.c +read_boundary_SRC = read-boundary.c +read_zero_SRC = read-zero.c +read_stdout_SRC = read-stdout.c +read_bad_fd_SRC = read-bad-fd.c +write_normal_SRC = write-normal.c +write_bad_ptr_SRC = write-bad-ptr.c +write_boundary_SRC = write-boundary.c +write_zero_SRC = write-zero.c +write_stdin_SRC = write-stdin.c +write_bad_fd_SRC = write-bad-fd.c +exec_once_SRC = exec-once.c +exec_arg_SRC = exec-arg.c +exec_multiple_SRC = exec-multiple.c +exec_missing_SRC = exec-missing.c +exec_bad_ptr_SRC = exec-bad-ptr.c +wait_simple_SRC = wait-simple.c +wait_twice_SRC = wait-twice.c +wait_killed_SRC = wait-killed.c +wait_bad_pid_SRC = wait-bad-pid.c +multi_recurse_SRC = multi-recurse.c +multi_oom_SRC = multi-oom.c +multi_child_fd_SRC = multi-child-fd.c -disks: $(DISKS) +SRCDIR = ../../src -# Other programs needed by some of the main test programs. -PROGS += child-simple child-arg child-bad child-close +PROGS = $(TESTS) child-simple child-arg child-bad child-close child_simple_SRC = child-simple.c child_arg_SRC = child-arg.c child_bad_SRC = child-bad.c child_close_SRC = child-close.c -exec-once.dsk exec-multiple.dsk join-simple.dsk join-twice.dsk: child-simple + +DISKS = $(patsubst %,%.dsk,$(TESTS)) null.dsk + +disks: $(DISKS) + +null.o: null.S +null: null.o + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ +null.dsk: null + +exec-once.dsk exec-multiple.dsk wait-simple.dsk wait-twice.dsk: child-simple exec-arg.dsk: child-arg -join-killed.dsk: child-bad +wait-killed.dsk: child-bad multi-child-fd.dsk: child-close %.dsk: % @@ -43,4 +98,10 @@ clean:: include $(SRCDIR)/Makefile.userprog +# Use -Werror because otherwise there's so much output spew +# that it's very difficult to pick out warnings. CFLAGS += -Werror + +Makefile: Make.base Make.tests mkmf + ./mkmf +