]> git.donarmstrong.com Git - lib.git/blobdiff - templates/makefiles/snp_information.mk
add some makefile templates
[lib.git] / templates / makefiles / snp_information.mk
diff --git a/templates/makefiles/snp_information.mk b/templates/makefiles/snp_information.mk
new file mode 100644 (file)
index 0000000..8a89c6b
--- /dev/null
@@ -0,0 +1,9 @@
+SNP_INFO ?=$(shell dir=./; while [ "$$( (cd $${dir} >/dev/null; pwd) )" != "/" ]; do if [ -e "$${dir}bin/snp_info" ]; then echo $${dir}bin/snp_info; break; fi; dir="$${dir}../"; done;)
+
+snp_information.txt: snp_list.txt
+       if [ -e $@.target.md5sum ] && [ -e $@ ] && md5sum --status --check $@.target.md5sum; then \
+               touch $@; \
+       else \
+               $(SNP_INFO) $(SNP_INFO_OPTIONS) $< > $@; \
+               md5sum $^ > $@.target.md5sum; \
+       fi;