smu

Simple markup processor
git clone https://git.sinitax.com/codemadness/smu
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 5573f301eb9eb97b251ff499ddca138417dcf43c
parent 79ae7cc136a53cc6fa0dfcce6adfd9351e028f0c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 13 May 2021 14:21:01 +0200

Makefile improvements, remove LIBOBJ which wasnt used

Diffstat:
MMakefile | 41+++++++++++++++++++++++------------------
1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,3 +1,6 @@ +.POSIX: + +NAME = smu VERSION = 1.5 # paths @@ -8,39 +11,41 @@ MANPREFIX = ${PREFIX}/share/man SMU_CFLAGS = -DVERSION=\"${VERSION}\" ${CFLAGS} SMU_LDFLAGS = ${LDFLAGS} -SRC = smu.c -OBJ = ${SRC:.c=.o} +SRC = ${NAME}.c +OBJ = ${SRC:.c=.o} +BIN = ${NAME} +MAN1 = ${NAME}.1 -all: smu +all: ${BIN} .c.o: ${CC} -c ${SMU_CFLAGS} $< ${OBJ}: -smu: ${OBJ} +${BIN}: ${OBJ} ${CC} -o $@ ${OBJ} ${SMU_LDFLAGS} clean: - rm -f smu ${OBJ} ${LIBOBJ} smu-${VERSION}.tar.gz + rm -f ${BIN} ${OBJ} "${NAME}-${VERSION}.tar.gz" dist: clean - mkdir -p smu-${VERSION} - cp -R LICENSE README testdoc Makefile smu.1 ${SRC} smu-${VERSION} - tar -cf smu-${VERSION}.tar smu-${VERSION} - gzip smu-${VERSION}.tar - rm -rf smu-${VERSION} + mkdir -p "${NAME}-${VERSION}" + cp -R LICENSE README testdoc Makefile ${MAN1} ${SRC} "${NAME}-${VERSION}" + tar -cf - "${NAME}-${VERSION}" | \ + gzip -c > "${NAME}-${VERSION}.tar.gz" + rm -rf "${NAME}-${VERSION}" install: all - mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f smu ${DESTDIR}${PREFIX}/bin - chmod 755 ${DESTDIR}${PREFIX}/bin/smu - mkdir -p ${DESTDIR}${MANPREFIX}/man1 - sed "s/VERSION/${VERSION}/g" < smu.1 > ${DESTDIR}${MANPREFIX}/man1/smu.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/smu.1 + mkdir -p "${DESTDIR}${PREFIX}/bin" + cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" + chmod 755 "${DESTDIR}${PREFIX}/bin/${BIN}" + mkdir -p "${DESTDIR}${MANPREFIX}/man1" + cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1" + chmod 644 "${DESTDIR}${MANPREFIX}/man1/${MAN1}" uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/smu \ - ${DESTDIR}${MANPREFIX}/man1/smu.1 + rm -f "${DESTDIR}${PREFIX}/bin/${BIN}" \ + "${DESTDIR}${MANPREFIX}/man1/${MAN1}" .PHONY: all clean dist install uninstall