]> git.tuebingen.mpg.de Git - tfortune.git/blobdiff - Makefile
debian: Update release notes for lintian-clean upload.
[tfortune.git] / Makefile
index bc6a7a5480d35b277fc55b5f18d2373e74f78baa..a03e991ca7af2645b21191cc7a9c0bb6c55cef8e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ MAKEFLAGS += -Rr
 RM := rm -f
 MKDIR_P := mkdir -p
 CHMOD := chmod
-GZIP := gzip -f9
+GZIP := gzip -nf9
 
 ifeq ("$(origin CC)", "default")
         CC := cc
@@ -24,12 +24,12 @@ SLOGAN := fortune cookies with tags
 AUTHOR := Andre Noll
 EMAIL := maan@tuebingen.mpg.de
 COPYRIGHT_YEAR := 2019
-PACKAGE_HOMEPAGE := http://people.tuebingen.mpg.de/maan/$(PACKAGE)/
-CLONE_URL := git://git.tuebingen.mpg.de/$(PACKAGE)/
-GITWEB_URL := http://git.tuebingen.mpg.de/$(PACKAGE).git
+PACKAGE_HOMEPAGE := https://people.tuebingen.mpg.de/maan/$(PACKAGE)/
+CLONE_URL := https://git.tuebingen.mpg.de/$(PACKAGE)/
+GITWEB_URL := https://git.tuebingen.mpg.de/$(PACKAGE).git
 LICENSE := GNU GPL version 3
 LICENSE_URL := https://www.gnu.org/licenses/gpl-3.0-standalone.html
-HOME_URL := http://people.tuebingen.mpg.de/maan/
+HOME_URL := https://people.tuebingen.mpg.de/maan/
 
 define DESCRIPTION1 :=
        Like fortune(6), tfortune is a Unix command line utility which prints
@@ -58,15 +58,19 @@ cc_version := $(shell $(CC) --version | head -n 1)
 build_date := $(shell date)
 uname_rs := $(shell uname -rs)
 
-all := tfortune tfortune.6.gz
-all: $(all)
+exe := tfortune
+man := tfortune.6.gz
+epigrams := epigrams/en.tfortunes
+all: $(man) $(exe)
+man build-indep: $(man)
+exe build-arch: $(exe)
 
 deps := txp.bison.d txp.flex.d ast.d tfortune.d util.d txp.flex.d \
        tfortune.lsg.d version.d linhash.d
 
 ifeq ($(findstring clean, $(MAKECMDGOALS)),)
 -include $(deps)
-include config.mak
+-include config.mak
 endif
 
 config.h.in: configure.ac
@@ -96,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)" \
@@ -147,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
@@ -179,12 +185,12 @@ tfortune: $(deps:.d=.o)
        $(CC) $^ -o $@ $(TF_LDFLAGS) $(LDFLAGS)
 
 .PHONY: all mostlyclean clean distclan maintainer-clean install \
-       install-strip README
+       install-strip README exe build-arch man build-indep
 
 mostlyclean:
-       $(RM) tfortune *.o *.d
+       $(RM) $(exe) *.o *.d
 clean: mostlyclean
-       $(RM) *.lsg.* *.flex.* *.bison.* *.6.gz *.suite
+       $(RM) *.lsg.* *.flex.* *.bison.* $(man) *.suite
 distclean: clean
        $(RM) config.mak config.status config.log config.h config.h.in \
                version.c configure.sh
@@ -193,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
@@ -201,9 +208,10 @@ ifneq ($(findstring strip, $(MAKECMDGOALS)),)
 endif
 
 install install-strip: all
-       $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
-       $(INSTALL_PROGRAM) $(strip_option) tfortune $(DESTDIR)$(bindir)
-       $(INSTALL_DATA) tfortune.6.gz $(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)
@@ -224,8 +232,8 @@ Resources
 
 Documentation
 ~~~~~~~~~~~~~
-See tfortune.suite. Or build the man page with \"make tfortune.6.gz\"
-and run \"man -l tfortune.6.gz\".
+See tfortune.suite. Or build the man page with \"make man\"
+and run \"man -l $(man)\".
 
 Dependencies
 ~~~~~~~~~~~~