Skip to content

Instantly share code, notes, and snippets.

@shlevy
Last active December 16, 2015 05:19
Show Gist options
  • Select an option

  • Save shlevy/5383241 to your computer and use it in GitHub Desktop.

Select an option

Save shlevy/5383241 to your computer and use it in GitHub Desktop.
$ make check
cc -c -o tests/register-action.o tests/register-action.c
cc -o tests/register-action.o.out tests/register-action.o
echo -n Running test tests/register-action...
Running test tests/register-action... Pass
rm tests/register-action.o
.POSIX:
TESTS = tests/register-action.test
.PHONY: all
all:
.PHONY: check
check: $(TESTS)
.SUFFIXES: .test
.o.test:
$(CC) $(LDFLAGS) -o $<.out $<
echo -n Running test $*...
@($<.out && echo " Pass") || (echo " Fail"; false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment