summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-09-11 16:49:04 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-09-11 16:49:04 +0100
commit095a7f4cf07e78016a5ba56a6f8e2d427ecc245a (patch)
tree4d6f987fd1d689a2196ffab90945f902f5c6419c /Makefile.am
parente9405fa20d0a88319f607d44cf7151423239ed21 (diff)
xkbcommon-keysyms: Add header protection
As there is currently no stable release of xkbcommon, other projects might want to include a copy of the keysyms so they can be used even though libxkbcommon may not be available on the machine. However, if xkbcommon.h is still included, conflicts will occur. Hence, to avoid nasty hacks, simply include a header protection in xkbcommon upstream. [daniels: Added protection to Makefile.am's update-keysyms, as well as XKB_KEY_NoSymbol, and a comment noting that it shouldn't be updated directly.] Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index bfe6c4f..b83d992 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,7 +156,11 @@ KEYSYMDEFS = \
$(X11_INCLUDEDIR)/DECkeysym.h \
$(X11_INCLUDEDIR)/HPkeysym.h
update-keysyms:
- sed -e '/XK_Ydiaeresis\s*0x100000ee/d; /#define _/d; s/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/; /\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) > xkbcommon/xkbcommon-keysyms.h
+ echo -en '#ifndef _XKBCOMMON_KEYSYMS_H\n#define _XKBCOMMON_KEYSYMS_H\n\n' > $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
+ echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
+ echo -en '#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
+ sed -e '/XK_Ydiaeresis\s*0x100000ee/d; /#define _/d; s/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/; /\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
+ echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
# Android stuff