diff --git a/Makefile b/Makefile index dcda37c..7fab25f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ########## Variables ########## -fortune_directory = /usr/share/fortune +fortune_directory = /usr/local/share/fortune # This just equals 'ttrpg.dat', but if someone wants to split it into separate # files, e.g. 'D20.dat' and 'WW.dat', the they would be included. @@ -31,8 +31,12 @@ install: $(targets) # Mathematicians had to do their own legal work as international law hadn't been # established. Now I'd like to digress from my prepared remarks to discuss how # I invented the terlet... -$(targets): $(fortune_directory)/%: % +$(targets): $(fortune_directory)/%: % | $(fortune_directory) install -pm644 $< $@ +$(fortune_directory): + mkdir $@ + uninstall: - $(RM) $(wildcard $(targets)) + $(RM) $(targets) + ! test -d $(fortune_directory) || rmdir --ignore-fail-on-non-empty $(fortune_directory)