view doc/manpages/DEFS.mk @ 19:db7ff952e01e

both mansupps seem to be html
author David A. Holland
date Tue, 31 May 2022 02:06:45 -0400
parents 13d2b8934445
children
line wrap: on
line source

include $(BUILDTOP)/config.mk
include $(TOP)/mk/installdirs.mk

all: ag.1 agcl.1

subst.sed: $(TOP)/anagram/ag1/version.h $(SRCDIR)/DEFS.mk
	@echo '        [CREATE]  subst.sed'
	@sed < $(TOP)/anagram/ag1/version.h \
		'1d;s/^#define /s,@/;s/  */@,/;s/$$/,/' > subst.sed

ag.1: $(SRCDIR)/ag.mdoc subst.sed
	@echo '        [SUBST]   ag.1'
	@sed -f subst.sed < $(SRCDIR)/ag.mdoc > ag.1

agcl.1: $(SRCDIR)/agcl.mdoc subst.sed
	@echo '        [SUBST]   agcl.1'
	@sed -f subst.sed < $(SRCDIR)/agcl.mdoc > agcl.1

clean distclean:
	@echo '        [RM]      ag.1 agcl.1 subst.sed'
	@rm -f ag.1 agcl.1 subst.sed

install: install.$(OS)

install.unix: install.$(HASGUI)
	@$(TOP)/mk/mkinstalldirs.sh "$(MANDIR)/man1"
	@echo '        [CP]      agcl.1'
	@cp agcl.1 "$(MANDIR)/man1/"
	@(cd "$(MANDIR)/man1/" && chmod 644 agcl.1)

install.hasgui:
	@$(TOP)/mk/mkinstalldirs.sh "$(MANDIR)/man1"
	@echo '        [CP]      ag.1'
	@cp ag.1 "$(MANDIR)/man1/"
	@(cd "$(MANDIR)/man1/" && chmod 644 ag.1)

rules depend agfiles agclean:;

install.windows install.nogui:;

.PHONY: all clean distclean rules depend install agfiles agclean
.PHONY: install.windows install.unix install.hasgui install.nogui