saait

Simple static page generator
git clone https://git.sinitax.com/codemadness/saait
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 520cf503b55c4ce2f3ccf47e7aa13d43b463fb1c
parent d5820b0d6a3f9105d19e9f35e14da5c790e1846d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 18 Oct 2019 20:30:06 +0200

simplify Makefile and improvements

- install Makefile.example on installation for examples.
- add Makefile.example to dist target.
- remove config.mk

Diffstat:
MMakefile | 22+++++++++++++++++-----
Dconfig.mk | 17-----------------
2 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,9 +1,18 @@ .POSIX: -include config.mk - NAME = saait VERSION = 0.4 + +# paths +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/man +DOCPREFIX = ${PREFIX}/share/doc/${NAME} + +# use system flags. +SAAIT_CFLAGS = ${CFLAGS} +SAAIT_LDFLAGS = ${LDFLAGS} +SAAIT_CPPFLAGS = -D_DEFAULT_SOURCE + SRC = \ saait.c HDR = \ @@ -15,7 +24,8 @@ MAN1 = \ saait.1 DOC = \ LICENSE\ - README + README\ + Makefile.example OBJ = ${SRC:.c=.o} @@ -31,7 +41,7 @@ dist: rm -rf ${NAME}-${VERSION} mkdir -p ${NAME}-${VERSION} cp -f ${MAN1} ${HDR} ${SRC} ${DOC} \ - Makefile config.mk \ + Makefile \ config.cfg print.css style.css \ ${NAME}-${VERSION} # pages and templates examples. @@ -41,7 +51,7 @@ dist: gzip -c > ${NAME}-${VERSION}.tar.gz rm -rf ${NAME}-${VERSION} -${OBJ}: config.mk ${HDR} +${OBJ}: ${HDR} saait: saait.o ${CC} -o $@ saait.o ${LDFLAGS} @@ -58,6 +68,7 @@ install: all mkdir -p ${DESTDIR}${DOCPREFIX} cp -f \ README\ + Makefile.example\ print.css\ style.css\ config.cfg\ @@ -75,6 +86,7 @@ uninstall: # removing example files. rm -f \ ${DESTDIR}${DOCPREFIX}/README\ + ${DESTDIR}${DOCPREFIX}/Makefile.example\ ${DESTDIR}${DOCPREFIX}/print.css\ ${DESTDIR}${DOCPREFIX}/style.css\ ${DESTDIR}${DOCPREFIX}/config.cfg diff --git a/config.mk b/config.mk @@ -1,17 +0,0 @@ -# customize below to fit your system - -# paths -PREFIX = /usr/local -MANPREFIX = ${PREFIX}/man -DOCPREFIX = ${PREFIX}/share/doc/saait - -# compiler and linker -CC = cc - -SAAIT_CFLAGS = ${CFLAGS} -SAAIT_LDFLAGS = ${LDFLAGS} -SAAIT_CPPFLAGS = -D_DEFAULT_SOURCE - -# debug -#SAAIT_CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic -#SAAIT_LDFLAGS =