Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/pcc/libexec use HOSTPROG to build the mkext pro...



details:   https://anonhg.NetBSD.org/src/rev/0369dd864a5e
branches:  trunk
changeset: 764244:0369dd864a5e
user:      plunky <plunky%NetBSD.org@localhost>
date:      Thu Apr 14 09:31:25 2011 +0000

description:
use HOSTPROG to build the mkext program (which creates external.c and
external.h for ccom) rather than HOST_CC directly.

because PROG and HOSTPROG don't play nicely together, put mkext in its
own SUBDIR

diffstat:

 external/bsd/pcc/libexec/Makefile       |   4 ++--
 external/bsd/pcc/libexec/ccom/Makefile  |  12 +++++++-----
 external/bsd/pcc/libexec/mkext/Makefile |  22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 7 deletions(-)

diffs (67 lines):

diff -r acb0211cb865 -r 0369dd864a5e external/bsd/pcc/libexec/Makefile
--- a/external/bsd/pcc/libexec/Makefile Thu Apr 14 09:25:05 2011 +0000
+++ b/external/bsd/pcc/libexec/Makefile Thu Apr 14 09:31:25 2011 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.4 2010/02/05 08:42:39 plunky Exp $
+#      $NetBSD: Makefile,v 1.5 2011/04/14 09:31:25 plunky Exp $
 
 .include <bsd.own.mk>
 
 .if (${MKPCCCMDS} != "no")
-SUBDIR=                ccom cpp
+SUBDIR=                mkext .WAIT ccom cpp
 .endif
 
 .include <bsd.subdir.mk>
diff -r acb0211cb865 -r 0369dd864a5e external/bsd/pcc/libexec/ccom/Makefile
--- a/external/bsd/pcc/libexec/ccom/Makefile    Thu Apr 14 09:25:05 2011 +0000
+++ b/external/bsd/pcc/libexec/ccom/Makefile    Thu Apr 14 09:31:25 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2010/06/03 19:17:22 plunky Exp $
+#      $NetBSD: Makefile,v 1.7 2011/04/14 09:31:25 plunky Exp $
 
 WARNS?=        2
 
@@ -31,10 +31,12 @@
 
 DPSRCS=        external.c external.h
 
-external.c external.h: mkext.c table.c common.c
-       ${HOST_CC} ${CFLAGS} ${CPPFLAGS} -DMKEXT -o ${.OBJDIR}/mkext ${.ALLSRC}
-       ${.OBJDIR}/mkext
+MKEXTDIR!=     cd ../mkext && ${PRINTOBJDIR}
 
-CLEANFILES+=   external.c external.h mkext
+external.c external.h: ${MKEXTDIR}/mkext
+       ${_MKTARGET_CREATE}
+       ${MKEXTDIR}/mkext
+
+CLEANFILES+=   external.c external.h
 
 .include <bsd.prog.mk>
diff -r acb0211cb865 -r 0369dd864a5e external/bsd/pcc/libexec/mkext/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/pcc/libexec/mkext/Makefile   Thu Apr 14 09:31:25 2011 +0000
@@ -0,0 +1,22 @@
+#      $NetBSD: Makefile,v 1.1 2011/04/14 09:31:25 plunky Exp $
+
+#
+# this is really part of ccom, but HOSTPROG and PROG don't mix
+#
+
+.include <bsd.init.mk>
+
+.PATH: ${PCC_DIST}/cc/ccom \
+       ${PCC_DIST}/arch/${TARGMACH} \
+       ${PCC_DIST}/mip
+
+HOSTPROG=      mkext
+MAN=
+SRCS=          mkext.c table.c common.c
+
+HOST_CPPFLAGS+=        -DMKEXT
+HOST_CPPFLAGS+=        -I${PCC_DIST}/mip
+HOST_CPPFLAGS+=        -I${PCC_DIST}/arch/${TARGMACH}
+HOST_CPPFLAGS+=        -I${PCC_DIR}/include
+
+.include <bsd.hostprog.mk>



Home | Main Index | Thread Index | Old Index