​Things under the covers
Bits and pieces of the big ideas
Getting a handle on testing requires you become comfortable writing test. The place to start is with the simplest test you can think of. Even though Make will notify you if a file is missing, learning how to write these simple test and to format useful output is a valuable skill to practice. Helper variable for a timestamp: DTS = $(shell date +%Y-%m-%dT%H:%M:%S-%Z) Test for a directory:
define test_dir # tests the directory in the <first dependency> if ! test -d $<; \ then echo $(DTS) [FAIL] - $< does not exist; \ else true; fi endef ROOTDIR := $(shell pwd) ROOTDIR: $(ROOTDIR) @$(test_dir)
0 Comments
|
Brian McMillanSweating the details and still looking at the big picture. ArchivesCategories |