Annotation of pod2mdoc/Makefile, Revision 1.14
1.14 ! schwarze 1: # $Id: Makefile,v 1.454 2015/02/03 21:16:02 schwarze Exp $
! 2: #
! 3: # Copyright (c) 2014 Kristaps Dzonsons <kristaps@bsd.lv>
! 4: # Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
! 5: #
! 6: # Permission to use, copy, modify, and distribute this software for any
! 7: # purpose with or without fee is hereby granted, provided that the above
! 8: # copyright notice and this permission notice appear in all copies.
! 9: #
! 10: # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
! 11: # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
! 12: # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
! 13: # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
! 14: # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
! 15: # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
! 16: # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1 schwarze 17:
1.14 ! schwarze 18: VERSION = 0.1
1.1 schwarze 19:
1.14 ! schwarze 20: # === USER CONFIGURATION ===============================================
1.3 kristaps 21:
1.14 ! schwarze 22: CFLAGS += -g
! 23: CFLAGS += -W -Wall -Wstrict-prototypes
! 24: CFLAGS += -Wno-unused-parameter -Wwrite-strings
! 25:
! 26: # Change to 0 on systems other than OpenBSD that do not provide
! 27: # a native ohash library; compat_ohash.* will be used in that case.
! 28:
! 29: CFLAGS += -DHAVE_OHASH=0
! 30:
! 31: # May be needed on systems other than OpenBSD when using HAVE_OHASH=1
! 32: # if ohash.h is not in the default header search path and/or
! 33: # the library containing the ohash functions is not in the
! 34: # default library search path.
! 35:
! 36: #CFLAGS += -I/usr/local/include
! 37: #LDFLAGS += -L/usr/local/lib
! 38:
! 39: # Needed for the ohash library on OpenBSD.
! 40: # You may have to comment this out on other systems,
! 41: # in particular when using HAVE_OHASH=0.
! 42:
! 43: #LDADD += -lutil
! 44:
! 45: # === LIST OF FILES ====================================================
! 46:
! 47: SRCS = compat_ohash.c \
! 48: dict.c \
! 49: pod2mdoc.c
! 50:
! 51: DISTFILES = Makefile \
! 52: compat_ohash.h \
! 53: dict.h \
! 54: pod2mdoc.1 \
! 55: $(SRCS)
! 56:
! 57: OBJS = compat_ohash.o \
! 58: dict.o \
! 59: pod2mdoc.o
! 60:
! 61: WWW_HTML = index.html \
! 62: pod2mdoc.1.html
! 63:
! 64: # === DEPENDENCY HANDLING ==============================================
! 65:
! 66: all: pod2mdoc
! 67:
! 68: dist: $(WWW_HTML) pod2mdoc.tgz
! 69:
! 70: .PHONY: clean installwww
! 71:
! 72: # === TARGETS CONTAINING SHELL COMMANDS ================================
! 73:
! 74: clean:
! 75: rm -f pod2mdoc $(OBJS) $(WWW_HTML) pod2mdoc.tgz
! 76: rm -rf *.dSYM
! 77:
! 78: pod2mdoc: $(OBJS)
! 79: $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD)
! 80:
! 81: # --- maintainer targets ---
! 82:
! 83: WWWPREFIX = /var/www/vhosts/mdocml.bsd.lv/htdocs/pod2mdoc
! 84:
! 85: installwww: dist
1.6 kristaps 86: mkdir -p $(WWWPREFIX)/snapshots
1.14 ! schwarze 87: install -m 0444 $(WWW_HTML) $(WWWPREFIX)
! 88: install -m 0444 pod2mdoc.tgz $(WWWPREFIX)/snapshots
! 89: ln -f $(WWWPREFIX)/snapshots/pod2mdoc.tgz \
! 90: $(WWWPREFIX)/snapshots/pod2mdoc-$(VERSION).tgz
1.3 kristaps 91:
1.14 ! schwarze 92: pod2mdoc.tgz: $(DISTFILES)
1.1 schwarze 93: mkdir -p .dist/pod2mdoc-$(VERSION)
1.14 ! schwarze 94: install -m 0644 $(DISTFILES) .dist/pod2mdoc-$(VERSION)
1.1 schwarze 95: (cd .dist && tar zcf ../$@ pod2mdoc-$(VERSION))
96: rm -rf .dist
97:
1.3 kristaps 98: index.html: index.xml
99: sed "s!@VERSION@!$(VERSION)!g" index.xml >$@
100:
101: pod2mdoc.1.html: pod2mdoc.1
102: mandoc -Thtml pod2mdoc.1 >$@
CVSweb