From 9bca93d11ed2a2d09272ccc5a534379f5088afd9 Mon Sep 17 00:00:00 2001 From: Enno Tensing Date: Wed, 22 Jan 2025 21:25:57 +0100 Subject: [PATCH] make: Fix some makefile problems --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index b2fcaee..fbcd3ca 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ # libscq - simple markup # (c) 2007, 2008 Enno Boland -VERSION = 2.0 +VERSION = 2.0.1 PREFIX ?= /usr/local -MANPREFIX ?= ${PREFIX}/share/man +BINDIR ?= ${PREFIX}/bin +MANDIR ?= ${PREFIX}/share/man/man1 CFLAGS += -DVERSION=\"${VERSION}\" PGO_GEN = ${CFLAGS} -fprofile-generate PGO_USE = ${CFLAGS} -fprofile-use -fprofile-correction @@ -45,25 +46,24 @@ pgo-build: ${SRC} clean: - rm -f scq ${OBJ} ${LIBOBJ} scq-${VERSION}.tar.gz + rm -f scq scq-${VERSION}.tar.gz dist: clean mkdir -p scq-${VERSION} - cp -R LICENSE Makefile config.mk scq.1 ${SRC} scq-${VERSION} + cp -R LICENSE Makefile scq.1 ${SRC} scq-${VERSION} tar -cf scq-${VERSION}.tar scq-${VERSION} gzip scq-${VERSION}.tar rm -rf scq-${VERSION} install: all - mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f scq ${DESTDIR}${PREFIX}/bin - chmod 755 ${DESTDIR}${PREFIX}/bin/scq - mkdir -p ${DESTDIR}${MANPREFIX}/man1 - sed "s/VERSION/${VERSION}/g" < scq.1 > ${DESTDIR}${MANPREFIX}/man1/scq.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/scq.1 + mkdir -p ${DESTDIR}${BINDIR} + install -m755 scq ${DESTDIR}${BINDIR} + mkdir -p ${DESTDIR}${MANDIR} + sed "s/VERSION/${VERSION}/g" < scq.1 > ${DESTDIR}${MANDIR}/scq.1 + chmod 644 ${DESTDIR}${MANDIR}/scq.1 uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/scq - rm -f ${DESTDIR}${MANPREFIX}/man1/scq.1 + rm -f ${DESTDIR}${BINDIR}/scq + rm -f ${DESTDIR}${MANDIR}/scq.1 .PHONY: all options clean dist install uninstall pgo-build