0fba3a0005
Brucify the Makefile. Differentiate atime and mtime in fetch*Stat(). Fix a few pointer bugs. Tweak some error messages. Don't #include sys/param.h and stdio.h in fetch.h. Document that sys/param.h and stdio.h must be #included before fetch.h.
51 lines
1.4 KiB
Makefile
51 lines
1.4 KiB
Makefile
# $Id: Makefile,v 1.9 1998/12/15 12:24:26 des Exp $
|
|
|
|
LIB= fetch
|
|
CFLAGS+= -I. -Wall -pedantic
|
|
.if !defined(DEBUG)
|
|
CFLAGS+= -DNDEBUG
|
|
.endif
|
|
SRCS= fetch.c common.c ftp.c http.c file.c fetch_err.c \
|
|
fetch_err.h ftperr.h httperr.h
|
|
MAN3= fetch.3
|
|
CLEANFILES= fetch_err.c fetch_err.h ftperr.h httperr.h
|
|
|
|
SHLIB_MAJOR= 1
|
|
SHLIB_MINOR= 0
|
|
|
|
beforeinstall:
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \
|
|
${DESTDIR}/usr/include
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 fetch_err.h \
|
|
${DESTDIR}/usr/include
|
|
|
|
ftperr.h: ftp.errors
|
|
@echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET}
|
|
@cat ${.ALLSRC} \
|
|
| grep -v ^# \
|
|
| sort \
|
|
| while read NUM CAT STRING; do \
|
|
echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
|
|
done >> ${.TARGET}
|
|
@echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
|
|
@echo "};" >> ${.TARGET}
|
|
|
|
httperr.h: http.errors
|
|
@echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET}
|
|
@cat ${.ALLSRC} \
|
|
| grep -v ^# \
|
|
| sort \
|
|
| while read NUM CAT STRING; do \
|
|
echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
|
|
done >> ${.TARGET}
|
|
@echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
|
|
@echo "};" >> ${.TARGET}
|
|
|
|
hdrs: fetch_err.h
|
|
|
|
.ORDER: fetch_err.c fetch_err.h
|
|
fetch_err.c fetch_err.h: fetch_err.et
|
|
compile_et -lang c ${.ALLSRC}
|
|
|
|
.include <bsd.lib.mk>
|