tfortune-1.0.1.
[tfortune.git] / Makefile
index 86e9a51c605946440cf7175779b470cc40500727..73c4612e287deb1d61861aff3e8bc9a81fdffec8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,7 @@ uname_rs := $(shell uname -rs)
 
 exe := tfortune
 man := tfortune.6.gz
+epigrams := epigrams/en.tfortunes
 all: $(man) $(exe)
 man build-indep: $(man)
 exe build-arch: $(exe)
@@ -69,7 +70,7 @@ deps := txp.bison.d txp.flex.d ast.d tfortune.d util.d txp.flex.d \
 
 ifeq ($(findstring clean, $(MAKECMDGOALS)),)
 -include $(deps)
-include config.mak
+-include config.mak
 endif
 
 config.h.in: configure.ac
@@ -99,6 +100,7 @@ version.c:
 index.html tfortune.suite: %: %.m4
        $(call SAY, M4 $<)
        $(M4) -D "AUTHOR=$(AUTHOR)" -D "COPYRIGHT_YEAR=$(COPYRIGHT_YEAR)" \
+               -D "DATADIR=$(datadir)" \
                -D "PACKAGE=$(PACKAGE)" \
                -D "SLOGAN=$(SLOGAN)" \
                -D "EMAIL=$(EMAIL)" \
@@ -150,6 +152,7 @@ TF_CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 TF_CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
 TF_CPPFLAGS += -DLICENSE='"$(LICENSE)"'
 TF_CPPFLAGS += -DLICENSE_URL='"$(LICENSE_URL)"'
+TF_CPPFLAGS += -DDATADIR='"$(datadir)"'
 TF_CPPFLAGS += -I/usr/local/include
 
 TF_CFLAGS += -g
@@ -196,6 +199,7 @@ maintainer-clean:
        git clean -dfqx > /dev/null 2>&1
 
 mandir := $(datarootdir)/man/man6
+epidir := $(datadir)/tfortunes/epigrams
 INSTALL ?= install
 INSTALL_PROGRAM ?= $(INSTALL) -m 755
 INSTALL_DATA ?= $(INSTALL) -m 644
@@ -204,9 +208,10 @@ ifneq ($(findstring strip, $(MAKECMDGOALS)),)
 endif
 
 install install-strip: all
-       $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
+       $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir) $(DESTDIR)$(epidir)
        $(INSTALL_PROGRAM) $(strip_option) $(exe) $(DESTDIR)$(bindir)
        $(INSTALL_DATA) $(man) $(DESTDIR)$(mandir)
+       $(INSTALL_DATA) $(epigrams) $(DESTDIR)$(epidir)
 
 define README :=
 tfortune - $(SLOGAN)