Subversion Repositories svn.Prod repos

Rev

Rev 38 | Blame | Compare with Previous | Last modification | View Log | RSS feed

PRG=filefind
SRC=$(PRG).c
DIR=/var/tmp/filefind_testdata
.PHONY: clean test cleantest

all: test

$(PRG): checkfiles.h $(SRC)
        @echo "INFO: Building $@ from $^"
        $(CC) $@.c -o $@

clean:
        rm -f $(PRG)

createtestdata:
        mkdir -p $(DIR)
        echo "bla" > $(DIR)/testfile

test: createtestdata $(PRG)
        ./$(PRG) $(DIR) > result
        sort result     > result.sort
        find $(DIR)     > result2
        sort result2    > result2.sort
        wc *.sort
        diff *.sort

cleantest:
        rm -f result    result.sort
        rm -f result2   result2.sort
        rm -rf $(DIR)