github.com/editorconfig-checker/editorconfig-checker@v0.0.0-20231102090242-ddae3e68851e/pkg/encoding/testdata/Makefile (about)

     1  
     2  PHONY+=all
     3  all: nuke download copy clean sum
     4  
     5  PHONY+=download
     6  download:
     7  	git clone --depth 1 https://github.com/gabriel-vasile/mimetype
     8  	git clone --depth 1 https://github.com/golang/text/
     9  	git clone --depth 1 https://github.com/stain/encoding-test-files
    10  	git clone --depth 1 https://github.com/baulk/chardet
    11  	wget -O utf8-sdl.txt https://raw.githubusercontent.com/libsdl-org/SDL/HEAD/test/utf8.txt
    12  
    13  PHONY+=copy
    14  copy:
    15  	cp -v --force --backup=simple --suffix=-mimetype.html mimetype/testdata/*.html .
    16  	cp -v --force --backup=simple --suffix=-mimetype.txt mimetype/testdata/*.txt .
    17  	cp -v --force --backup=simple --suffix=-text.txt text/encoding/testdata/*.txt .
    18  	cp -v --force --backup=simple --suffix=-encoding-test-files.txt encoding-test-files/*.txt .
    19  	cp -v --force --backup=simple --suffix=-chardet.html chardet/testdata/*.html .
    20  
    21  PHONY+=tidy
    22  tidy:
    23  	rm -f json*.txt not*.txt
    24  
    25  PHONY+=sum
    26  sum:
    27  	sha256sum *.html *.txt | grep -v sha256sums\.txt >sha256sums.txt
    28  
    29  define _clean
    30  rm -fr mimetype text encoding-test-files chardet
    31  endef
    32  
    33  PHONY+=clean
    34  clean: tidy
    35  	$(call _clean)
    36  
    37  PHONY+=nuke
    38  nuke:
    39  	$(call _clean)
    40  	rm -f *.html *.txt
    41  
    42  .PHONY: $(PHONY)