mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
Made this actually work when there's an object directory:
- replaced bogus dependencies of distribution sources on generated
sources by the same ones that bsd.lib.mk would generate if it knew
all the sources. We shoot ourself in the foot by not naming the
generated (included) sources *.h, so we can just put the generated
sources in SRCS.
- replaced -I${.CURDIR} by `-I.'. Here `.' is an alias for ${.OBJDIR}.
-I${.CURDIR} didn't do anything, since ${.CURDIR} is the default in
all cases here (it would be necessary for ""-style includes made from
sources in ${.OBJDIR}.
Don't use `+=' for setting CLEANFILES for the first time.
Added $Id$.
This commit is contained in:
parent
450e9e37dc
commit
90152d9d21
1 changed files with 11 additions and 4 deletions
|
|
@ -1,17 +1,21 @@
|
|||
# $Id$
|
||||
|
||||
LIB= fetch
|
||||
CFLAGS+= -I${.CURDIR} -Wall -pedantic -DNDEBUG
|
||||
CFLAGS+= -I. -Wall -pedantic -DNDEBUG
|
||||
SRCS= fetch.c ftp.c http.c file.c
|
||||
DPSRCS= ftperr.c httperr.c
|
||||
MAN3= fetch.3
|
||||
CLEANFILES+= ftperr.c httperr.c
|
||||
CLEANFILES= ${DPSRCS}
|
||||
|
||||
SHLIB_MAJOR= 1
|
||||
SHLIB_MINOR= 0
|
||||
|
||||
beforedepend: ${DPSRCS}
|
||||
|
||||
beforeinstall:
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \
|
||||
${DESTDIR}/usr/include
|
||||
|
||||
ftp.c: ftperr.c
|
||||
ftperr.c: ftp.errors
|
||||
@echo "struct ftperr {" \ > ${.TARGET}
|
||||
@echo " const int num;" \ >> ${.TARGET}
|
||||
|
|
@ -27,7 +31,6 @@ ftperr.c: ftp.errors
|
|||
@echo " { -1, \"Unknown FTP error\" }" >> ${.TARGET}
|
||||
@echo "};" >> ${.TARGET}
|
||||
|
||||
http.c: httperr.c
|
||||
httperr.c: http.errors
|
||||
@echo "struct httperr {" \ > ${.TARGET}
|
||||
@echo " const int num;" \ >> ${.TARGET}
|
||||
|
|
@ -44,3 +47,7 @@ httperr.c: http.errors
|
|||
@echo "};" >> ${.TARGET}
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
.if !exists(${DEPENDFILE})
|
||||
${OBJS} ${POBJS} ${SOBJS}: ${DPSRCS}
|
||||
.endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue