share/syscons: Separate hostprog and remove it from btools.
authorzrj <rimvydas.jasinskas@gmail.com>
Sun, 20 May 2018 14:22:51 +0000 (17:22 +0300)
committerzrj <zrj@dragonflybsd.org>
Sun, 20 May 2018 17:34:36 +0000 (20:34 +0300)
The scrnmaps are not needed for buildworld.

Makefile.inc1
share/syscons/Makefile
share/syscons/mapsmk/Makefile [new file with mode: 0644]
share/syscons/scrnmaps/Makefile
share/syscons/scrnmaps/Makefile.scrnmaps [new file with mode: 0644]

index 5235b46..a850ad3 100644 (file)
@@ -915,10 +915,6 @@ bstrap-${_tool}!
 # XXX we may be able to remove or consolidate this into bootstrap-tools
 # now that we have the native helper (.nx/.no) infrastructure.
 #
-.if exists(${.CURDIR}/share) && !defined(NO_SHARE)
-_share=        share/syscons/scrnmaps
-.endif
-
 # XXX we should separate this into new Makefile.inc2.
 # Just to prepare for reduction of ORDER: that slows down parallel crossworld.
 
@@ -951,7 +947,6 @@ _binutils= gnu/usr.bin/${WORLD_BINUTILSVER}
 BTOOLSDIRS+=   ${${_atools}}
 .endfor
 BTOOLSDIRS+=   ${_gcc50_tools}
-BTOOLSDIRS+=   ${_share}
 
 build-tools: build-tools-targets
        touch ${BTOOLSDEST}/.build_done
index d7e112b..a429a95 100644 (file)
@@ -1,6 +1,5 @@
 # $FreeBSD: src/share/syscons/Makefile,v 1.4 1999/08/28 00:21:55 peter Exp $
-# $DragonFly: src/share/syscons/Makefile,v 1.2 2003/06/17 04:37:02 dillon Exp $
 
-SUBDIR= fonts keymaps scrnmaps
+SUBDIR= fonts keymaps mapsmk scrnmaps
 
 .include <bsd.subdir.mk>
diff --git a/share/syscons/mapsmk/Makefile b/share/syscons/mapsmk/Makefile
new file mode 100644 (file)
index 0000000..dc8cca1
--- /dev/null
@@ -0,0 +1,28 @@
+# hostprog helpers for screen maps generation
+.PATH: ${.CURDIR}/../scrnmaps
+
+# SCRMAPS
+.include "./Makefile.scrnmaps"
+
+SCRMAPS_MK=    ${SCRMAPS:R:S/$/.nx/g}
+
+${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c
+       ${NXCC} ${NXCFLAGS} -I${.CURDIR}/../scrnmaps -DFIL=\"${.TARGET:R}\" ${NXLDFLAGS} \
+               -o ${.TARGET} ${.CURDIR}/../scrnmaps/mkscrfil.c
+
+CLEANFILES+=   ${SCRMAPS_MK}
+
+genfiles: ${SCRMAPS_MK}
+depend all: genfiles
+
+build-tools: ${SCRMAPS_MK}
+
+# this tools are used in place, they are not installed anywhere
+install:
+
+# Hint HOST_CCVER handling.
+__USE_HOST_CCVER=
+
+.include <bsd.obj.mk>
+.include <bsd.dep.mk>
+.include <bsd.sys.mk>
index a908351..0635e4b 100644 (file)
@@ -1,28 +1,19 @@
 # $FreeBSD: src/share/syscons/scrnmaps/Makefile,v 1.14.2.3 2002/08/07 16:31:52 ru Exp $
 
-SCRMAPS = iso-8859-1_to_cp437.scm iso-8859-4_for_vga9.scm \
-         iso-8859-7_to_cp437.scm \
-         koi8-r2cp866.scm koi8-u2cp866u.scm \
-         us-ascii_to_cp437.scm
+# SCRMAPS
+.include "./Makefile.scrnmaps"
 
-SCRMAPS_MK = ${SCRMAPS:R:S/$/.mk/g}
 SCRDIR = ${SHAREDIR}/syscons/scrnmaps
-CLEANFILES+= ${SCRMAPS_MK} ${SCRMAPS}
+CLEANFILES+= ${SCRMAPS}
 
 NOMAN = noman
 
 FILES=         ${SCRMAPS}
 FILESDIR=      ${SCRDIR}
 
-build-tools: ${SCRMAPS_MK}
-
-${SCRMAPS}: ${.TARGET:R}.mk
-       ./${.TARGET:R}.mk ${.TARGET:R}.tmp
+${SCRMAPS}: ${.TARGET:R} mkscrfil.c
+       ${.OBJDIR}/../mapsmk/${.TARGET:R}.nx ${.TARGET:R}.tmp
        uuencode ${.TARGET:R}.tmp ${.TARGET:R} > ${.TARGET}
        rm -f ${.TARGET:R}.tmp
 
-${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c
-       ${NXCC} ${NXCFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" ${NXLDFLAGS} \
-           -o ${.TARGET} ${.CURDIR}/mkscrfil.c
-
 .include <bsd.prog.mk>
diff --git a/share/syscons/scrnmaps/Makefile.scrnmaps b/share/syscons/scrnmaps/Makefile.scrnmaps
new file mode 100644 (file)
index 0000000..05ff42e
--- /dev/null
@@ -0,0 +1,5 @@
+
+SCRMAPS=       iso-8859-1_to_cp437.scm iso-8859-4_for_vga9.scm \
+               iso-8859-7_to_cp437.scm \
+               koi8-r2cp866.scm koi8-u2cp866u.scm \
+               us-ascii_to_cp437.scm