[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / docbook2mdoc

File: [cvsweb.bsd.lv] / docbook2mdoc / Makefile (download)

Revision 1.11, Wed Apr 2 12:27:05 2014 UTC (8 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_7
Changes since 1.10: +6 -18 lines

Improve (and fix) manpage and index page.
Remove now-trivial examples.

VERSION = 0.0.7
CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings 
WWWPREFIX = /usr/vhosts/mdocml.bsd.lv/www/htdocs/docbook2mdoc

docbook2mdoc: docbook2mdoc.o rules.o
	$(CC) -o $@ docbook2mdoc.o rules.o -lexpat

www: index.html docbook2mdoc.1.html docbook2mdoc-$(VERSION).tgz README.txt

installwww: www
	mkdir -p $(WWWPREFIX)/snapshots
	install -m 0444 index.html docbook2mdoc.1.html README.txt $(WWWPREFIX)
	install -m 0444 docbook2mdoc-$(VERSION).tgz $(WWWPREFIX)/snapshots
	install -m 0444 docbook2mdoc-$(VERSION).tgz $(WWWPREFIX)/snapshots/docbook2mdoc.tgz

dist: docbook2mdoc-$(VERSION).tgz

docbook2mdoc-$(VERSION).tgz:
	mkdir -p .dist/docbook2mdoc-$(VERSION)
	install -m 0444 docbook2mdoc.c rules.c extern.h Makefile docbook2mdoc.1 .dist/docbook2mdoc-$(VERSION)
	(cd .dist && tar zcf ../$@ docbook2mdoc-$(VERSION))
	rm -rf .dist

docbook2mdoc.o rules.o: extern.h

index.html: index.xml
	sed "s!@VERSION@!$(VERSION)!g" index.xml >$@

docbook2mdoc.1.html: docbook2mdoc.1
	mandoc -Thtml docbook2mdoc.1 >$@

README.txt: README
	cp README $@

clean:
	rm -f docbook2mdoc docbook2mdoc.o rules.o
	rm -rf docbook2mdoc.dSYM
	rm -f index.html docbook2mdoc.1.html docbook2mdoc-$(VERSION).tgz README.txt