summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2019-03-09 20:10:20 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2019-03-09 20:10:20 +0000
commit45baa15017a3ad2f04929dca4ac09904aa526b20 (patch)
tree50322b4f0f7178f9c433b2f39d811997448110f7 /app
parent3cab0b61e872d72ccc7aa38e2432691c6ff929d5 (diff)
Make it possible to build xterm with OPT_TRACE.
with tweaks from kn@.
Diffstat (limited to 'app')
-rw-r--r--app/xterm/Makefile23
-rw-r--r--app/xterm/trace.c2
2 files changed, 15 insertions, 10 deletions
diff --git a/app/xterm/Makefile b/app/xterm/Makefile
index 4316eed04..03813783f 100644
--- a/app/xterm/Makefile
+++ b/app/xterm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.32 2017/06/18 21:09:07 espie Exp $
+# $OpenBSD: Makefile,v 1.33 2019/03/09 20:10:19 matthieu Exp $
.include <bsd.xconf.mk>
SUBDIR= icons resize
@@ -37,6 +37,8 @@ screen.o: screen.c
misc.o: builtin_icons.h
+trace.o: VTparse.cin
+
# do this to quiet gcc -Wcast-qual warnings
builtin_icons.h :
@echo "#if OPT_BUILTIN_XPMS" >$@
@@ -49,15 +51,10 @@ builtin_icons.h :
@echo "#endif" >>$@
@echo "made $@"
-.SUFFIXES: .hin .def
-
-.def.hin:
- awk '/^CASE_/{printf "#define %s %d\n", $$1, n++}' < $< >$@
-
-beforedepend: builtin_icons.h VTparse.hin
-BUILDFIRST = builtin_icons.h VTparse.hin
+beforedepend: builtin_icons.h VTparse.cin VTparse.hin
+BUILDFIRST = builtin_icons.h VTparse.cin VTparse.hin
-.SUFFIXES: .man .1
+.SUFFIXES: .man .1 .def .cin .hin
PATCH_NUM != sed -n '/XTERM_PATCH/s/[^0-9]*//gp' ${.CURDIR}/version.h
PATCH_YMD != sed -n '/XTERM_DATE/s,[^0-9/.-]*,,gp' ${.CURDIR}/version.h
@@ -82,7 +79,7 @@ PATCH_YMD != sed -n '/XTERM_DATE/s,[^0-9/.-]*,,gp' ${.CURDIR}/version.h
-e s%/etc/wtmp%/var/run/wtmp%g \
< $< > $@
-CLEANFILES+= ${MAN} builtin_icons.h VTparse.hin
+CLEANFILES+= ${MAN} builtin_icons.h VTparse.cin VTparse.hin
afterinstall:
${INSTALL} ${INSTALL_COPY} -m ${SHAREMODE} \
@@ -94,5 +91,11 @@ afterinstall:
obj: _xenocara_obj
+.def.cin:
+ awk '/^CASE_/{printf "{ %d, \"%s\" },\n", n++, $$1; }' $< >$@
+
+.def.hin:
+ awk '/^CASE_/{printf "#define %s %d\n", $$1, n++; }' $< >$@
+
.include <bsd.prog.mk>
.include <bsd.xorg.mk>
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index c35782d13..c3036d11d 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -492,6 +492,7 @@ visibleSelectionTarget(Display *d, Atom a)
return result;
}
+#if OPT_TEK4014
const char *
visibleTekparse(int code)
{
@@ -511,6 +512,7 @@ visibleTekparse(int code)
}
return result;
}
+#endif
const char *
visibleVTparse(int code)