summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-04-12 16:25:13 +0000
committerru <ru@FreeBSD.org>2002-04-12 16:25:13 +0000
commit8ed4d7e8ddbb28ce53740ce9510aa172747e8d00 (patch)
treea1df6244fdfb50e0054808950a00e9318eaa2586
parenta51f09d3d4be7e6e2e222e093fb3909a1815d713 (diff)
downloadFreeBSD-src-8ed4d7e8ddbb28ce53740ce9510aa172747e8d00.zip
FreeBSD-src-8ed4d7e8ddbb28ce53740ce9510aa172747e8d00.tar.gz
Back out second part of the previous change. While this was
indeed a good change, I shouldn't have made it after testing with the -DNOCLEAN buildworld. There are far too many users of this misfeature under sys/boot/. I will reapply the change after I fix these. This change has been tested with the clean buildworld.
-rw-r--r--share/mk/bsd.prog.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 90d1b90..883159c 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -25,7 +25,6 @@ PROG= ${PROG_CXX}
.endif
.if defined(PROG)
-.if !target(${PROG})
.if defined(SRCS)
# If there are Objective C sources, link with Objective C libraries.
@@ -36,8 +35,16 @@ LDADD+= ${OBJCLIBS}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
+${PROG}: ${OBJS}
+.if defined(PROG_CXX)
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
+.else
+ ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
+.endif
+
.else !defined(SRCS)
+.if !target(${PROG})
.if defined(PROG_CXX)
SRCS= ${PROG}.cc
.else
@@ -50,7 +57,6 @@ SRCS= ${PROG}.c
# the name of a variable temporary object.
# - it's useful to keep objects around for crunching.
OBJS= ${PROG}.o
-.endif
${PROG}: ${OBJS}
.if defined(PROG_CXX)
@@ -58,6 +64,7 @@ ${PROG}: ${OBJS}
.else
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
.endif
+.endif
.endif
OpenPOWER on IntegriCloud