freebsd-dev/lib/libftpio/Makefile
Marcel Moolenaar a9fb3603bb Fix style bugs and ordering
Submitted by: bde
1999-10-03 10:40:11 +00:00

31 lines
736 B
Makefile

# $FreeBSD$
LIB= ftpio
SHLIB_MAJOR= 5
SHLIB_MINOR= 0
SRCS= ftpio.c ftperr.c
CFLAGS+= -I${.CURDIR} -Wall
MAN3= ftpio.3
CLEANFILES= ftperr.c
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/ftpio.h \
${DESTDIR}/usr/include
ftperr.c: ftp.errors
@echo '#include <stdio.h>' > ${.TARGET}
@echo '#include "ftpio.h"' >> ${.TARGET}
@echo "struct ftperr ftpErrList[] = {" \ >> ${.TARGET}
@cat ${.ALLSRC} \
| grep -v ^# \
| sort \
| while read NUM STRING; do \
echo " { $${NUM}, \"$${STRING}\" },"; \
done >> ${.TARGET}
@echo "};" >> ${.TARGET}
@echo -n "int const ftpErrListLength = " >> ${.TARGET}
@echo "sizeof(ftpErrList) / sizeof(*ftpErrList);" >> ${.TARGET}
.include <bsd.lib.mk>