stagit

static git page generator
git clone git://git.sgregoratto.me/stagit
Log | Files | Refs | README | LICENSE

Makefile (1866B)


      1 include Makefile.configure
      2 
      3 NAME = stagit
      4 VERSION = 0.9.2
      5 
      6 BIN = stagit stagit-index
      7 SRC = stagit.c stagit-index.c compats.c
      8 DOC = stagit.1 stagit-index.1 LICENSE README
      9 
     10 all: ${BIN}
     11 
     12 dist:
     13 	rm -rf ${NAME}-${VERSION}
     14 	mkdir -p ${NAME}-${VERSION}
     15 	cp -f ${MAN1} ${HDR} ${SRC} ${COMPATSRC} ${DOC} \
     16 		Makefile favicon.png logo.png style.css \
     17 		example_create.sh example_post-receive.sh \
     18 		${NAME}-${VERSION}
     19 	# make tarball
     20 	tar -cf - ${NAME}-${VERSION} | \
     21 		gzip -c > ${NAME}-${VERSION}.tar.gz
     22 	rm -rf ${NAME}-${VERSION}
     23 
     24 stagit: stagit.c compats.o
     25 	${CC} ${CFLAGS} ${LDFLAGS} -o $@ stagit.c compats.o
     26 
     27 stagit-index: stagit-index.c compats.o
     28 	${CC} ${CFLAGS} ${LDFLAGS} -o $@ stagit-index.c compats.o
     29 
     30 clean:
     31 	rm -f stagit stagit-index ${OBJS} ${NAME}-${VERSION}.tar.gz
     32 
     33 install: all
     34 	# installing executable files.
     35 	mkdir -p ${DESTDIR}${BINDIR}
     36 	${INSTALL_BIN} stagit ${DESTDIR}${BINDIR}
     37 	${INSTALL_BIN} stagit-index ${DESTDIR}${BINDIR}
     38 	# installing example files.
     39 	mkdir -p ${DESTDIR}${SHAREDIR}/doc
     40 	cp -f	style.css\
     41 		favicon.png\
     42 		logo.png\
     43 		example_create.sh\
     44 		example_post-receive.sh\
     45 		README\
     46 		${DESTDIR}${SHAREDIR}/doc
     47 	# installing manual pages.
     48 	mkdir -p ${DESTDIR}${MANDIR}/man1
     49 	${INSTALL_MAN} stagit.1 ${DESTDIR}${MANDIR}/man1
     50 	${INSTALL_MAN} stagit-index.1 ${DESTDIR}${MANDIR}/man1
     51 
     52 uninstall:
     53 	# removing executable files.
     54 	for f in ${BIN}; do rm -f ${DESTDIR}${PREFIX}/bin/$$f; done
     55 	# removing example files.
     56 	rm -f \
     57 		${DESTDIR}${DOCPREFIX}/style.css\
     58 		${DESTDIR}${DOCPREFIX}/favicon.png\
     59 		${DESTDIR}${DOCPREFIX}/logo.png\
     60 		${DESTDIR}${DOCPREFIX}/example_create.sh\
     61 		${DESTDIR}${DOCPREFIX}/example_post-receive.sh\
     62 		${DESTDIR}${DOCPREFIX}/README
     63 	-rmdir ${DESTDIR}${DOCPREFIX}
     64 	# removing manual pages.
     65 	rm -f ${DESTDIR}${MANDIR}/man1/stagit.1
     66 	rm -f ${DESTDIR}${MANDIR}/man1/stagit-index.1
     67 
     68 .PHONY: all clean dist install uninstall