| 1# $Id$ 2
|
1LIB= fetch
| 3LIB= fetch
|
2CFLAGS+= -I${.CURDIR} -Wall -pedantic -DNDEBUG
| 4CFLAGS+= -I. -Wall -pedantic -DNDEBUG
|
3SRCS= fetch.c ftp.c http.c file.c
| 5SRCS= fetch.c ftp.c http.c file.c
|
| 6DPSRCS= ftperr.c httperr.c
|
4MAN3= fetch.3
| 7MAN3= fetch.3
|
5CLEANFILES+= ftperr.c httperr.c
| 8CLEANFILES= ${DPSRCS}
|
6 7SHLIB_MAJOR= 1 8SHLIB_MINOR= 0 9
| 9 10SHLIB_MAJOR= 1 11SHLIB_MINOR= 0 12
|
| 13beforedepend: ${DPSRCS} 14
|
10beforeinstall: 11 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \ 12 ${DESTDIR}/usr/include 13
| 15beforeinstall: 16 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \ 17 ${DESTDIR}/usr/include 18
|
14ftp.c: ftperr.c
| |
15ftperr.c: ftp.errors 16 @echo "struct ftperr {" \ > ${.TARGET} 17 @echo " const int num;" \ >> ${.TARGET} 18 @echo " const char *string;" \ >> ${.TARGET} 19 @echo "};" \ >> ${.TARGET} 20 @echo "static struct ftperr _ftp_errlist[] = {" \ >> ${.TARGET} 21 @cat ${.ALLSRC} \ 22 | grep -v ^# \ 23 | sort \ 24 | while read NUM STRING; do \ 25 echo " { $${NUM}, \"$${STRING}\" },"; \ 26 done >> ${.TARGET} 27 @echo " { -1, \"Unknown FTP error\" }" >> ${.TARGET} 28 @echo "};" >> ${.TARGET} 29
| 19ftperr.c: ftp.errors 20 @echo "struct ftperr {" \ > ${.TARGET} 21 @echo " const int num;" \ >> ${.TARGET} 22 @echo " const char *string;" \ >> ${.TARGET} 23 @echo "};" \ >> ${.TARGET} 24 @echo "static struct ftperr _ftp_errlist[] = {" \ >> ${.TARGET} 25 @cat ${.ALLSRC} \ 26 | grep -v ^# \ 27 | sort \ 28 | while read NUM STRING; do \ 29 echo " { $${NUM}, \"$${STRING}\" },"; \ 30 done >> ${.TARGET} 31 @echo " { -1, \"Unknown FTP error\" }" >> ${.TARGET} 32 @echo "};" >> ${.TARGET} 33
|
30http.c: httperr.c
| |
31httperr.c: http.errors 32 @echo "struct httperr {" \ > ${.TARGET} 33 @echo " const int num;" \ >> ${.TARGET} 34 @echo " const char *string;" \ >> ${.TARGET} 35 @echo "};" \ >> ${.TARGET} 36 @echo "static struct httperr _http_errlist[] = {" \ >> ${.TARGET} 37 @cat ${.ALLSRC} \ 38 | grep -v ^# \ 39 | sort \ 40 | while read NUM STRING; do \ 41 echo " { $${NUM}, \"$${STRING}\" },"; \ 42 done >> ${.TARGET} 43 @echo " { -1, \"Unknown HTTP error\" }" >> ${.TARGET} 44 @echo "};" >> ${.TARGET} 45 46.include <bsd.lib.mk>
| 34httperr.c: http.errors 35 @echo "struct httperr {" \ > ${.TARGET} 36 @echo " const int num;" \ >> ${.TARGET} 37 @echo " const char *string;" \ >> ${.TARGET} 38 @echo "};" \ >> ${.TARGET} 39 @echo "static struct httperr _http_errlist[] = {" \ >> ${.TARGET} 40 @cat ${.ALLSRC} \ 41 | grep -v ^# \ 42 | sort \ 43 | while read NUM STRING; do \ 44 echo " { $${NUM}, \"$${STRING}\" },"; \ 45 done >> ${.TARGET} 46 @echo " { -1, \"Unknown HTTP error\" }" >> ${.TARGET} 47 @echo "};" >> ${.TARGET} 48 49.include <bsd.lib.mk>
|
| 50 51.if !exists(${DEPENDFILE}) 52${OBJS} ${POBJS} ${SOBJS}: ${DPSRCS} 53.endif
|
| |