diff options
author | des <des@FreeBSD.org> | 1998-07-09 16:52:44 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 1998-07-09 16:52:44 +0000 |
commit | 9c2d60ed01099cbfa3e878c62cb5ea061a728317 (patch) | |
tree | 04d9af7541ed2b2073b59882ba5ff645c502f891 /lib/libfetch/Makefile | |
download | FreeBSD-src-9c2d60ed01099cbfa3e878c62cb5ea061a728317.zip FreeBSD-src-9c2d60ed01099cbfa3e878c62cb5ea061a728317.tar.gz |
Imported libfetch into the tree. It compiles, but there's still some
work to do. I especially need help with the man page.
Diffstat (limited to 'lib/libfetch/Makefile')
-rw-r--r-- | lib/libfetch/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile new file mode 100644 index 0000000..ad502d1 --- /dev/null +++ b/lib/libfetch/Makefile @@ -0,0 +1,44 @@ +LIB= fetch +CFLAGS+= -I${.CURDIR} -Wall +SRCS= fetch.c ftp.c http.c file.c base64.c +MAN3= fetch.3 +CLEANFILES+= ftperr.c httperr.c + +SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 + +beforeinstall: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \ + ${DESTDIR}/usr/include + +ftperr.c: ftp.errors + @echo "struct ftperr {" \ >> ${.TARGET} + @echo " const int num;" \ >> ${.TARGET} + @echo " const char *string;" \ >> ${.TARGET} + @echo "};" \ >> ${.TARGET} + @echo "static struct ftperr _ftp_errlist[] = {" \ >> ${.TARGET} + @cat ${.ALLSRC} \ + | grep -v ^# \ + | sort \ + | while read NUM STRING; do \ + echo " { $${NUM}, \"$${NUM} $${STRING}\" },"; \ + done >> ${.TARGET} + @echo " { 0, \"Unknown FTP error\" }" >> ${.TARGET} + @echo "};" >> ${.TARGET} + +httperr.c: http.errors + @echo "struct httperr {" \ >> ${.TARGET} + @echo " const int num;" \ >> ${.TARGET} + @echo " const char *string;" \ >> ${.TARGET} + @echo "};" \ >> ${.TARGET} + @echo "static struct httperr _http_errlist[] = {" \ >> ${.TARGET} + @cat ${.ALLSRC} \ + | grep -v ^# \ + | sort \ + | while read NUM STRING; do \ + echo " { $${NUM}, \"$${NUM} $${STRING}\" },"; \ + done >> ${.TARGET} + @echo " { 0, \"Unknown HTTP error\" }" >> ${.TARGET} + @echo "};" >> ${.TARGET} + +.include <bsd.lib.mk> |