Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/share/mk Pull up revision 1.1 (requested by itojun in t...
details: https://anonhg.NetBSD.org/src/rev/98eb7f0082ae
branches: netbsd-1-6
changeset: 527652:98eb7f0082ae
user: tv <tv%NetBSD.org@localhost>
date: Thu May 30 23:59:29 2002 +0000
description:
Pull up revision 1.1 (requested by itojun in ticket #100):
have bsd.endian.mk, which detects target endian.
generate *.db in target endian. (see tech-userlevel for discussions)
diffstat:
share/mk/bsd.endian.mk | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r d2c985606ea0 -r 98eb7f0082ae share/mk/bsd.endian.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/mk/bsd.endian.mk Thu May 30 23:59:29 2002 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: bsd.endian.mk,v 1.2.2.2 2002/05/30 23:59:29 tv Exp $
+
+.include <bsd.init.mk>
+
+# find out endianness of target and set proper flag for pwd_mkdb so that
+# it creates database in same endianness.
+.if exists(${DESTDIR}/usr/include/sys/endian.h)
+TARGET_ENDIANNESS!= \
+ printf '\#include <sys/endian.h>\n_BYTE_ORDER\n' | \
+ ${CC} -I${DESTDIR}/usr/include -E - | tail -1 | awk '{print $$1}'
+.else
+TARGET_ENDIANNESS=
+.endif
+
+#.if ${TARGET_ENDIANNESS} == "1234"
+#TARGET_ENDIANNESS= little
+#.elif ${TARGET_ENDIANNESS} == "4321"
+#TARGET_ENDIANNESS= big
+#.else
+#TARGET_ENDIANNESS= unknown
+#.endif
Home |
Main Index |
Thread Index |
Old Index