Return to Makefile CVS log | Up to [cvsweb.bsd.lv] / docbook2mdoc |
File: [cvsweb.bsd.lv] / docbook2mdoc / Makefile (download)
Revision 1.24, Fri Apr 12 19:14:50 2019 UTC (4 years, 11 months ago) by schwarze
Implement lint and tree dump output modes. Thanks to the previously committed node property infrastructure in node.c, this needs only 110 lines of code (including the license and the documentation). |
VERSION = 0.0.9 CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings WWWPREFIX = /usr/vhosts/mdocml.bsd.lv/www/htdocs/docbook2mdoc PREFIX = /usr/local HEADS = node.h parse.h macro.h format.h SRCS = node.c parse.c macro.c docbook2mdoc.c tree.c main.c OBJS = node.o parse.o macro.o docbook2mdoc.o tree.o main.o all: docbook2mdoc docbook2mdoc: $(OBJS) $(CC) -g -o $@ $(OBJS) statistics: statistics.o $(CC) -g -o $@ statistics.c www: index.html docbook2mdoc.1.html docbook2mdoc-$(VERSION).tgz README.txt install: all mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/man/man1 install -m 0755 docbook2mdoc $(DESTDIR)$(PREFIX)/bin install -m 0444 docbook2mdoc.1 $(DESTDIR)$(PREFIX)/man/man1 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 $(HEADS) $(SRCS) Makefile docbook2mdoc.1 \ .dist/docbook2mdoc-$(VERSION) (cd .dist && tar zcf ../$@ docbook2mdoc-$(VERSION)) rm -rf .dist node.o: node.h parse.o: node.h parse.h macro.o: node.h macro.h docbook2mdoc.o: node.h macro.h format.h tree.o: node.h format.h main.o: node.h parse.h format.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 $(OBJS) docbook2mdoc.core rm -f statistics statistics.o statistics.core rm -rf docbook2mdoc.dSYM rm -f index.html docbook2mdoc.1.html README.txt rm -f docbook2mdoc-$(VERSION).tgz