X-Git-Url: http://git.tuebingen.mpg.de/?p=tfortune.git;a=blobdiff_plain;f=Makefile;h=bc6a7a5480d35b277fc55b5f18d2373e74f78baa;hp=9500595125f046d38938aeb7311e514254c876a0;hb=d48e676ab44873c402acbafc5d7602fdee6a05fb;hpb=e5a096f0056656151ad4aa9820633f51817919f2 diff --git a/Makefile b/Makefile index 9500595..bc6a7a5 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ MAKEFLAGS += -Rr RM := rm -f MKDIR_P := mkdir -p CHMOD := chmod +GZIP := gzip -f9 ifeq ("$(origin CC)", "default") CC := cc @@ -18,15 +19,20 @@ else SAY = @echo '$(strip $(1))' endif +PACKAGE := tfortune +SLOGAN := fortune cookies with tags AUTHOR := Andre Noll -COPYRIGHT_YEAR := 2018 -CLONE_URL := git://git.tuebingen.mpg.de/tfortune -GITWEB_URL := http://git.tuebingen.mpg.de/tfortune.git +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 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/ define DESCRIPTION1 := - Like fortune(1), tfortune is a Unix command line utility which prints + Like fortune(6), tfortune is a Unix command line utility which prints a random epigram. Epigrams are stored as plain text files, but they must be annotated with tags to make full use of the features which tfortune offers over other implementations. @@ -47,12 +53,12 @@ define DESCRIPTION3 := that enables bash command line completion is also included. endef LOGLEVELS := LL_DEBUG,LL_INFO,LL_NOTICE,LL_WARNING,LL_ERROR,LL_CRIT,LL_EMERG -GIT_VERSION := $(shell ./version-gen.sh) +GIT_VERSION := $(shell ./version-gen.sh $(PACKAGE) version.c) cc_version := $(shell $(CC) --version | head -n 1) build_date := $(shell date) uname_rs := $(shell uname -rs) -all := tfortune tfortune.1 +all := tfortune tfortune.6.gz all: $(all) deps := txp.bison.d txp.flex.d ast.d tfortune.d util.d txp.flex.d \ @@ -90,10 +96,14 @@ version.c: index.html tfortune.suite: %: %.m4 $(call SAY, M4 $<) $(M4) -D "AUTHOR=$(AUTHOR)" -D "COPYRIGHT_YEAR=$(COPYRIGHT_YEAR)" \ - -D "PACKAGE_BUGREPORT=$(PACKAGE_BUGREPORT)" \ + -D "PACKAGE=$(PACKAGE)" \ + -D "SLOGAN=$(SLOGAN)" \ + -D "EMAIL=$(EMAIL)" \ -D "PACKAGE_URL=$(PACKAGE_URL)" \ + -D "PACKAGE_HOMEPAGE=$(PACKAGE_HOMEPAGE)" \ -D "CLONE_URL=$(CLONE_URL)" \ -D "GITWEB_URL=$(GITWEB_URL)" \ + -D "HOME_URL=$(HOME_URL)" \ -D "LICENSE=$(LICENSE)" \ -D "LICENSE_URL=$(LICENSE_URL)" \ -D "DESCRIPTION1=$(DESCRIPTION1)" \ @@ -107,9 +117,10 @@ index.html tfortune.suite: %: %.m4 $(call SAY, LSGH $<) $(LOPSUBGEN) --gen-header < $< -%.1: %.suite version.c +%.6.gz: %.suite version.c $(call SAY, LSGM $<) - $(LOPSUBGEN) --gen-man=$@ --version-string $(GIT_VERSION) < $< + $(LOPSUBGEN) --gen-man=${@:.gz=} --version-string $(GIT_VERSION) < $< + $(GZIP) ${@:.gz=} %.flex.c: %.lex $(call SAY, FLEX $<) @@ -122,7 +133,14 @@ index.html tfortune.suite: %: %.m4 TF_CPPFLAGS += -Wunused-macros TF_CPPFLAGS += -DCOPYRIGHT_YEAR='"$(COPYRIGHT_YEAR)"' +TF_CPPFLAGS += -DPACKAGE='"$(PACKAGE)"' TF_CPPFLAGS += -DAUTHOR='"$(AUTHOR)"' +TF_CPPFLAGS += -DEMAIL='"$(EMAIL)"' +TF_CPPFLAGS += -DPACKAGE_HOMEPAGE='"$(PACKAGE_HOMEPAGE)"' +TF_CPPFLAGS += -DCLONE_URL='"$(CLONE_URL)"' +TF_CPPFLAGS += -DGITWEB_URL='"$(GITWEB_URL)"' +TF_CPPFLAGS += -DHOME_URL='"$(HOME_URL)"' +TF_CPPFLAGS += -DGET_VERSION='$(PACKAGE)_version' TF_CPPFLAGS += -DLOGLEVELS='$(LOGLEVELS)' TF_CPPFLAGS += -DBUILD_DATE='"$(build_date)"' TF_CPPFLAGS += -DCC_VERSION='"$(cc_version)"' @@ -166,14 +184,15 @@ tfortune: $(deps:.d=.o) mostlyclean: $(RM) tfortune *.o *.d clean: mostlyclean - $(RM) *.lsg.* *.flex.* *.bison.* *.1 *.suite + $(RM) *.lsg.* *.flex.* *.bison.* *.6.gz *.suite distclean: clean - $(RM) config.mak config.status config.log config.h config.h.in version.c + $(RM) config.mak config.status config.log config.h config.h.in \ + version.c configure.sh $(RM) -r autom4te.cache maintainer-clean: git clean -dfqx > /dev/null 2>&1 -mandir := $(datarootdir)/man/man1 +mandir := $(datarootdir)/man/man6 INSTALL ?= install INSTALL_PROGRAM ?= $(INSTALL) -m 755 INSTALL_DATA ?= $(INSTALL) -m 644 @@ -184,11 +203,11 @@ endif install install-strip: all $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir) $(INSTALL_PROGRAM) $(strip_option) tfortune $(DESTDIR)$(bindir) - $(INSTALL_DATA) tfortune.1 $(DESTDIR)$(mandir) + $(INSTALL_DATA) tfortune.6.gz $(DESTDIR)$(mandir) define README := -tfortune - fortune cookies with tags -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +tfortune - $(SLOGAN) + $(DESCRIPTION1) $(DESCRIPTION2) @@ -197,14 +216,16 @@ $(DESCRIPTION3) Resources ~~~~~~~~~ +| web page: $(PACKAGE_HOMEPAGE) | git clone URL: $(CLONE_URL) -| web page: $(PACKAGE_URL) -| email: $(AUTHOR) <$(PACKAGE_BUGREPORT)> +| gitweb: $(GITWEB_URL) +| author's home page: $(HOME_URL) +| Send feedback to: $(AUTHOR) <$(EMAIL)> Documentation ~~~~~~~~~~~~~ -See tfortune.suite. Or build the man page with \"make tfortune.1\" -and run \"man -l tfortune.1\". +See tfortune.suite. Or build the man page with \"make tfortune.6.gz\" +and run \"man -l tfortune.6.gz\". Dependencies ~~~~~~~~~~~~