X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile;h=66f0470dc7e2196984dec94236fa057ede3ec88f;hb=2aa67575353d6b4e5a8411c69d96fabe80af41fc;hp=aefbe2113aff8fe195acdf07e91b4bbfd96fdac2;hpb=6f18187fadd61f42a8e207342b27f17d9b1b9f77;p=tfortune.git diff --git a/Makefile b/Makefile index aefbe21..66f0470 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 @@ -31,7 +32,7 @@ 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. @@ -57,8 +58,11 @@ cc_version := $(shell $(CC) --version | head -n 1) build_date := $(shell date) uname_rs := $(shell uname -rs) -all := tfortune tfortune.1 -all: $(all) +exe := tfortune +man := tfortune.6.gz +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 @@ -116,9 +120,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 $<) @@ -177,19 +182,20 @@ 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.* *.1 *.suite + $(RM) *.lsg.* *.flex.* *.bison.* $(man) *.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 @@ -199,8 +205,8 @@ 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_PROGRAM) $(strip_option) $(exe) $(DESTDIR)$(bindir) + $(INSTALL_DATA) $(man) $(DESTDIR)$(mandir) define README := tfortune - $(SLOGAN) @@ -221,8 +227,8 @@ Resources 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 man\" +and run \"man -l $(man)\". Dependencies ~~~~~~~~~~~~