# List all the fortune files you maintain here.  (I just have them
# all in one big file)
FORTUNES = dmarti

# For every fortune file, the datfile is the same name but with .dat
# on the end
DATFILES = $(FORTUNES:=.dat)

# This target makes a copy of the fortunes file to the zork.net
# collection (http://zork.net/fortunes/)
tozork : $(DATFILES)
	rsync -v $(FORTUNES) $(DATFILES) zork.net:/usr/share/games/fortunes
	touch tozork

# This target makes each .dat file from the appropriate fortune
# file, if it has changed.
%.dat : %
	strfile $<

# Get rid of all the .dat files (not really needed, but it's traditional
# to have "make clean" do _something_)
clean :
	rm -f $(DATFILES) tozork

.PHONY : clean
