Makefrag 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Makefrag - makefile fragment for fortune/datfiles
  2. #
  3. # Copyright (c) 1997, 1998, 1999, 2001, 2003 Joseph Samuel Myers.
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions
  8. # are met:
  9. # 1. Redistributions of source code must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. # 2. Redistributions in binary form must reproduce the above copyright
  12. # notice, this list of conditions and the following disclaimer in the
  13. # documentation and/or other materials provided with the distribution.
  14. # 3. The name of the author may not be used to endorse or promote products
  15. # derived from this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  18. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  19. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  20. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  21. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  22. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  24. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. # SUCH DAMAGE.
  28. fortune_datfiles_DATFILES := farber.dat fortunes.dat fortunes2.dat limerick.dat startrek.dat zippy.dat
  29. fortune_datfiles_DATFILES_off := fortunes-o.dat fortunes2-o.dat limerick-o.dat unamerican-o.dat
  30. fortune_datfiles_GENSRCFILES := fortunes-o fortunes2-o limerick-o unamerican-o
  31. fortune_datfiles_SRCFILES := farber fortunes fortunes2 limerick startrek zippy
  32. fortune_datfiles_DATFILESp := fortune/datfiles/farber.dat \
  33. fortune/datfiles/fortunes.dat fortune/datfiles/fortunes2.dat \
  34. fortune/datfiles/limerick.dat fortune/datfiles/startrek.dat \
  35. fortune/datfiles/zippy.dat
  36. fortune_datfiles_DATFILES_offp := fortune/datfiles/fortunes-o.dat \
  37. fortune/datfiles/fortunes2-o.dat fortune/datfiles/limerick-o.dat \
  38. fortune/datfiles/unamerican-o.dat
  39. fortune_datfiles_GENSRCFILESp := fortune/datfiles/fortunes-o \
  40. fortune/datfiles/fortunes2-o fortune/datfiles/limerick-o \
  41. fortune/datfiles/unamerican-o
  42. fortune_datfiles_SRCFILESp := fortune/datfiles/farber \
  43. fortune/datfiles/fortunes fortune/datfiles/fortunes2 \
  44. fortune/datfiles/limerick fortune/datfiles/startrek \
  45. fortune/datfiles/zippy
  46. fortune_datfiles_CLEANFILES := $(fortune_datfiles_DATFILES) $(fortune_datfiles_DATFILES_off) $(fortune_datfiles_GENSRCFILES)
  47. fortune_datfiles_DIRS := $(FORTUNE_DIR)
  48. fortune_datfiles_all: $(fortune_datfiles_DATFILESp) $(fortune_datfiles_DATFILES_offp) $(fortune_datfiles_SRCFILESp) $(fortune_datfiles_GENSRCFILESp)
  49. fortune_datfiles_install: fortune_datfiles_all
  50. set -e; for f in $(fortune_datfiles_SRCFILES) \
  51. $(fortune_datfiles_GENSRCFILES) $(fortune_datfiles_DATFILES) \
  52. $(fortune_datfiles_DATFILES_off); do \
  53. $(INSTALL_DATA) fortune/datfiles/$$f \
  54. $(INSTALL_PREFIX)$(FORTUNE_DIR)/$$f; \
  55. done
  56. $(fortune_datfiles_DATFILESp): fortune/datfiles/%.dat: fortune/datfiles/% fortune/strfile/strfile
  57. fortune/strfile/strfile -rs $< $@
  58. $(fortune_datfiles_DATFILES_offp): fortune/datfiles/%.dat: fortune/datfiles/% fortune/strfile/strfile
  59. fortune/strfile/strfile -rsx $< $@
  60. $(fortune_datfiles_GENSRCFILESp): %: %.$(FORTUNE_TYPE)
  61. tr a-zA-Z n-za-mN-ZA-M <$< >$@