Skip to content

Instantly share code, notes, and snippets.

@dearprakash
Created January 22, 2022 05:54
Show Gist options
  • Select an option

  • Save dearprakash/d4967d396d59d3eeb3e012b91b25baa9 to your computer and use it in GitHub Desktop.

Select an option

Save dearprakash/d4967d396d59d3eeb3e012b91b25baa9 to your computer and use it in GitHub Desktop.
Makefile for creating .dat files for fortune
# This will look at any file in that directory that isn't named "README", "Makefile", or that doesn't already end with ".dat". It will then run strfile on them, resulting in correspondingly named datfiles.
POSSIBLE += $(shell ls -1 | egrep -v '\.dat|README|Makefile' | sed -e 's/$$/.dat/g')
all: ${POSSIBLE}
%.dat : %
@strfile $< $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment