=================================================================== RCS file: /cvs/texi2mdoc/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.8 diff -u -p -r1.1.1.1 -r1.8 --- texi2mdoc/Makefile 2015/02/16 22:24:43 1.1.1.1 +++ texi2mdoc/Makefile 2015/02/24 14:35:40 1.8 @@ -1,8 +1,55 @@ -CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings +CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings +OBJS = main.o util.o +SRCS = main.c util.c +VERSIONS = version_0_1_1.xml \ + version_0_1_2.xml +VERSION = 0.1.1 +PREFIX = /usr/local -texi2mdoc: main.o - $(CC) -o $@ main.o +all: texi2mdoc +www: index.html texi2mdoc.1.html texi2mdoc.tgz texi2mdoc.tgz.sha512 + +afl: afl/texi2mdoc + +texi2mdoc: $(OBJS) + $(CC) -o $@ $(OBJS) + +install: all + mkdir -p $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(PREFIX)/man/man1 + install -m 0755 texi2mdoc $(DESTDIR)$(PREFIX)/bin + install -m 0444 texi2mdoc.1 $(DESTDIR)$(PREFIX)/man/man1 + +installwww: www + mkdir -p $(PREFIX)/snapshots + install -m 0444 index.html texi2mdoc.1.html $(PREFIX) + install -m 0444 texi2mdoc.tgz texi2mdoc.tgz.sha512 $(PREFIX)/snapshots + install -m 0444 texi2mdoc.tgz $(PREFIX)/snapshots/texi2mdoc-$(VERSION).tgz + install -m 0444 texi2mdoc.tgz.sha512 $(PREFIX)/snapshots/texi2mdoc-$(VERSION).tgz.sha512 + +$(OBJS): extern.h + +afl/texi2mdoc: extern.h $(SRCS) + afl-clang -o $@ $(SRCS) + +index.html: index.xml $(VERSIONS) + sblg -o- -t index.xml $(VERSIONS) | sed "s!@VERSION@!$(VERSION)!g" >$@ + +texi2mdoc.1.html: texi2mdoc.1 + mandoc -Thtml texi2mdoc.1 >$@ + +texi2mdoc.tgz: + mkdir -p .dist/texi2mdoc-$(VERSION) + install -m 0444 $(SRCS) extern.h Makefile texi2mdoc.1 .dist/texi2mdoc-$(VERSION) + (cd .dist && tar zcf ../$@ texi2mdoc-$(VERSION)) + rm -rf .dist + +texi2mdoc.tgz.sha512: texi2mdoc.tgz + openssl dgst -sha512 texi2mdoc.tgz >$@ + clean: - rm -f texi2mdoc main.o - rm -rf texi2mdoc.dSYM + rm -f $(OBJS) + rm -f texi2mdoc afl/texi2mdoc + rm -rf texi2mdoc.dSYM afl/texi2mdoc.dSYM + rm -f index.html texi2mdoc.1.html texi2mdoc.tgz texi2mdoc.tgz.sha512