SRC= anonymize.pl anonymize_c.pl 
AUXILIARY= makefile inp.txt inp.csv README.md
ALL= $(SRC) $(AUXILIARY)

# top: demo-medium

demo: demo-small

demo-all: demo-old demo-small demo-medium demo-full

demo-old: anonymize.pl inp.txt
	@echo " "
	@echo "    OLD version (tab sep. input)"
	@echo "    basic usage on a small file ----------------"
	perl anonymize.pl  -c1,2 inp.txt


demo-small: anonymize_c.pl inp.csv
	@echo " "
	@echo "    basic usage on a small file ----------------"
	@echo "--- the result is ---"
	@perl anonymize_c.pl  -c1,2 inp.csv
	@echo "--- while the input was ---"
	@cat inp.csv

# create a look-up table, and start numbering from zero '-z'
demo-medium:
	@echo " "
	@echo "    creates lookup table; uses -z flag to start from zero ---"
	\rm -f lookup-ascii
	perl anonymize_c.pl -z -plookup-ascii -c1,2 inp.csv

demo-full: anonymize_c.pl inp.csv
	@echo " "
	@echo "    creates hash-lookup table, too ----------------"
	\rm -f lookup-ascii
	perl anonymize_c.pl -plookup-ascii -nlookup-hash-table -d -c1,2 inp.csv


all.tar: $(ALL)
	tar cvf all.tar $(ALL)

clean:
	\rm -rf TST

spotless: clean
	\rm -f *.dbm lookup-ascii
	\rm -f all.tar
