X-Git-Url: http://git.claws-mail.org/?p=clawsker.git;a=blobdiff_plain;f=Makefile;h=787ca93e7c3a4b6b1a9bd123b5ec341fda2015dc;hp=572d5f65bac7689cf37eac41ad7f01a0c728c994;hb=c2a36c12e18b57d646c0c497ffcfa5f68585de9c;hpb=132e8b0f4bfb3a7149e7af5c09c6cc9d818dafaf;ds=sidebyside diff --git a/Makefile b/Makefile index 572d5f6..787ca93 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,63 @@ # -# Clawsker makefile +# Clawsker Makefile +# Copyright 2007-2015 Ricardo Mones +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# See COPYING file for license details. # -NAME=clawsker -PREFIX=/usr/local -BINDIR=${PREFIX}/bin -DATADIR=${PREFIX}/share -LIBDIR=${PREFIX}/lib/${NAME} -MANDIR=${DATADIR}/man -MAN1DIR=${MANDIR}/man1 +NAME = clawsker +VERSION ?= 0.7.13 +PREFIX ?= /usr/local +BINDIR = ${PREFIX}/bin +DATADIR = ${PREFIX}/share +LIBDIR = ${PREFIX}/lib/${NAME} +MANDIR = ${DATADIR}/man +MAN1DIR = ${MANDIR}/man1 -all: ${NAME}.1 +all: build -${NAME}.1: - pod2man ${NAME} > ${NAME}.1 +build: + -mkdir build + sed -e "s,@PREFIX@,${PREFIX},;s,@LIBDIR@,${LIBDIR},;s,@VERSION@,${VERSION}," < ${NAME} > build/${NAME} + pod2man --release ${VERSION} -c '' ${NAME}.pod > build/${NAME}.1 + ${MAKE} -C po build + install: all install-dirs - install -m 0755 ${NAME} ${DESTDIR}${BINDIR} - install -m 0644 ${NAME}.1 ${DESTDIR}${MAN1DIR} + install -m 0755 build/${NAME} ${DESTDIR}${BINDIR} + install -m 0644 build/${NAME}.1 ${DESTDIR}${MAN1DIR} + ${MAKE} -C po install install-dirs: install -d ${DESTDIR}${BINDIR} install -d ${DESTDIR}${MAN1DIR} + ${MAKE} -C po install-dirs uninstall: rm -f ${DESTDIR}${BINDIR}/${NAME} rm -f ${DESTDIR}${MAN1DIR}/${NAME}.1 + ${MAKE} -C po uninstall + +dist: + rm -rf ${NAME}-${VERSION} + mkdir ${NAME}-${VERSION} + cp -p AUTHORS ChangeLog.old clawsker clawsker.pod \ + COPYING Makefile NEWS README ${NAME}-${VERSION} + cp -rp po ${NAME}-${VERSION} + tar cJf ${NAME}-${VERSION}.tar.xz ${NAME}-${VERSION} \ + && rm -rf ${NAME}-${VERSION} + +clean-build: + rm -rf build -clean: - rm -f ${NAME}.1 *~ +clean: clean-build + rm -f *~ + ${MAKE} -C po clean -.PHONY: all install install-dirs uninstall clean +.PHONY: all build install install-dirs uninstall clean clean-build dist