Skip to content

Commit

Permalink
Updated 0.2 branch to the latest trunk (401:457) in preparation for t…
Browse files Browse the repository at this point in the history
…he release.
  • Loading branch information
spbnick committed May 27, 2010
1 parent 1e6e7b3 commit 6aa7929
Show file tree
Hide file tree
Showing 116 changed files with 3,730 additions and 902 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

SUBDIRS = m4 db include lib src

dist_noinst_SCRIPTS = bootstrap
dist_noinst_SCRIPTS = bootstrap distcheck-all

ACLOCAL_AMFLAGS = -I m4/autoconf
16 changes: 16 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
2010-05-27: 0.2.0
* XML input supported
* Specification example output supported
* Source code output supported
* Stream library redesigned
* A lot of other (smaller) changes and fixes

2010-05-27: 0.1.3
* Minor bug fixes

2010-03-03: 0.1.2
* Minor bug fixes

2010-02-27: 0.1.1
* Native input supported
* XML output supported
54 changes: 32 additions & 22 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CFLAGS=$CFLAGS
CFLAGS="-Os -Wall -Wextra -Werror $CFLAGS"
ABS_SRCDIR=`cd ${srcdir} ; pwd`
ABS_BUILDDIR=`pwd`
CPPFLAGS="-I${ABS_BUILDDIR}/include -D_GNU_SOURCE -DNDEBUG $CPPFLAGS"
CPPFLAGS="-I${ABS_BUILDDIR} -I${ABS_BUILDDIR}/include -D_GNU_SOURCE -DNDEBUG $CPPFLAGS"
if test "$ABS_SRCDIR" != "$ABS_BUILDDIR"; then
CPPFLAGS="-I${ABS_SRCDIR}/include $CPPFLAGS"
fi
Expand Down Expand Up @@ -133,6 +133,13 @@ AC_ARG_ENABLE(
[disable building specification example format support (requires tokens and names)]),
[], [enable_spec_format="yes"])

AC_ARG_ENABLE(
code-format,
AS_HELP_STRING(
[--disable-code-format],
[disable building source code format support (requires specification example format)]),
[], [enable_code_format="yes"])

# Check for stream library dependencies
if test "$enable_streams" = "yes"; then
if test "$enable_opt" != "yes"; then
Expand Down Expand Up @@ -180,6 +187,14 @@ if test "$enable_spec_format" = "yes"; then
fi
fi

# Check for code format dependencies
if test "$enable_code_format" = "yes"; then
if test "$enable_spec_format" != "yes"; then
AC_MSG_WARN([specification example format is disabled, so disabling source code format])
enable_code_format="no"
fi
fi

# Check hidrd-convert tool dependencies
if test "$enable_hidrd_convert" = "yes"; then
if test "$enable_formats" != "yes"; then
Expand All @@ -198,33 +213,14 @@ AM_CONDITIONAL([ENABLE_TOKENS], [test "$enable_tokens" = "yes"])
AM_CONDITIONAL([ENABLE_NAMES], [test "$enable_names" = "yes"])
AM_CONDITIONAL([ENABLE_FMT_XML], [test "$enable_xml_format" = "yes"])
AM_CONDITIONAL([ENABLE_FMT_SPEC], [test "$enable_spec_format" = "yes"])
AM_CONDITIONAL([ENABLE_FMT_CODE], [test "$enable_code_format" = "yes"])

# Output features to preprocessor and compiler
if test "$enable_debug" == "yes"; then
if test "$enable_debug" = "yes"; then
CPPFLAGS="$CPPFLAGS -UNDEBUG"
CFLAGS="$CFLAGS -g -O0"
fi

if test "$enable_opt" == "yes"; then
CPPFLAGS="$CPPFLAGS -DHIDRD_WITH_OPT"
fi

if test "$enable_tokens" == "yes"; then
CPPFLAGS="$CPPFLAGS -DHIDRD_WITH_TOKENS"
fi

if test "$enable_names" == "yes"; then
CPPFLAGS="$CPPFLAGS -DHIDRD_WITH_NAMES"
fi

if test "$enable_xml_format" == "yes"; then
CPPFLAGS="$CPPFLAGS -DHIDRD_FMT_WITH_XML"
fi

if test "$enable_spec_format" == "yes"; then
CPPFLAGS="$CPPFLAGS -DHIDRD_FMT_WITH_SPEC"
fi

#
# Checks for header files.
#
Expand All @@ -233,6 +229,18 @@ fi
# Checks for typedefs, structures, and compiler characteristics.
#

#
# Checks for declarations
#
if test -n "$XML2_CONFIG"; then
CFLAGS_BACKUP="$CFLAGS"
CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
AC_CHECK_DECLS([xmlStructuredErrorContext], [], [],
[[#include <libxml/globals.h>]])
CFLAGS="$CFLAGS_BACKUP"
fi


#
# Checks for library functions.
#
Expand Down Expand Up @@ -262,6 +270,7 @@ AC_CONFIG_FILES([Makefile
include/hidrd/fmt/xml/Makefile
include/hidrd/fmt/spec/Makefile
include/hidrd/fmt/spec/snk/Makefile
include/hidrd/fmt/code/Makefile
include/hidrd/usage/Makefile
lib/Makefile
Expand All @@ -280,6 +289,7 @@ AC_CONFIG_FILES([Makefile
lib/fmt/write_test_data/Makefile
lib/fmt/spec/Makefile
lib/fmt/spec/snk/Makefile
lib/fmt/code/Makefile
lib/usage/Makefile
src/Makefile])
Expand Down
2 changes: 1 addition & 1 deletion db/usage/id_consumer.m4
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ ID(`028B', `AC_forward_msg', `Sel', `AC forward msg')dnl
ID(`028C', `AC_send', `Sel', `AC send')dnl
ID(`028D', `AC_attach_file', `Sel', `AC attach file')dnl
ID(`028E', `AC_upload', `Sel', `AC upload')dnl
ID(`028F', `AC_download_and_save_as', `Sel', ``AC download (save target as)'')dnl
ID(`028F', `AC_download_and_save_as', `Sel', `AC download (save target as)')dnl
ID(`0290', `AC_set_borders', `Sel', `AC set borders')dnl
ID(`0291', `AC_insert_row', `Sel', `AC insert row')dnl
ID(`0292', `AC_insert_column', `Sel', `AC insert column')dnl
Expand Down
8 changes: 4 additions & 4 deletions db/usage/id_keyboard.m4
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ ID(`0022', `KB_5_and_percent', `Sel', `keyboard 5 and %')dnl
ID(`0023', `KB_6_and_caret', `Sel', `keyboard 6 and ^')dnl
ID(`0024', `KB_7_and_amp', `Sel', `keyboard 7 and &')dnl
ID(`0025', `KB_8_and_star', `Sel', `keyboard 8 and *')dnl
ID(`0026', `KB_9_and_left_paren', `Sel', ``keyboard 9 and ('')dnl
ID(`0027', `KB_0_and_right_paren', `Sel', ``keyboard 0 and )'')dnl
ID(`0026', `KB_9_and_left_paren', `Sel', `keyboard 9 and left parenthesis')dnl
ID(`0027', `KB_0_and_right_paren', `Sel', `keyboard 0 and right parenthesis')dnl
ID(`0028', `KB_Enter', `Sel', `keyboard Return (ENTER)')dnl
ID(`0029', `KB_Escape', `Sel', `keyboard Escape')dnl
ID(`002A', `KB_Delete', `Sel', `keyboard Delete (Backspace)')dnl
Expand Down Expand Up @@ -198,8 +198,8 @@ ID(`00B2', `thousands_separator', `Sel', `thousands separator')dnl
ID(`00B3', `decimal_separator', `Sel', `decimal separator')dnl
ID(`00B4', `currency_unit', `Sel', `currency unit')dnl
ID(`00B5', `currency_subunit', `Sel', `currency sub-unit')dnl
ID(`00B6', `KP_left_paren', `Sel', ``keypad ('')dnl
ID(`00B7', `KP_right_paren', `Sel', ``keypad )'')dnl
ID(`00B6', `KP_left_paren', `Sel', `keypad left parenthesis')dnl
ID(`00B7', `KP_right_paren', `Sel', `keypad right parenthesis')dnl
ID(`00B8', `KP_left_brace', `Sel', `keypad {')dnl
ID(`00B9', `KP_right_brace', `Sel', `keypad }')dnl
ID(`00BA', `KP_Tab', `Sel', `keypad Tab')dnl
Expand Down
3 changes: 0 additions & 3 deletions distcheck-all
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ set -e -u -o pipefail

declare -a OPTION_LIST=(
enable-debug
enable-tests-install
disable-opt
disable-streams
disable-formats
disable-hidrd-convert
disable-tokens
disable-names
Expand Down
26 changes: 26 additions & 0 deletions include/hidrd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,23 @@ hidrd_HEADERS = \
item.h

if ENABLE_OPT
WITH_OPT_DIRECTIVE = define
SUBDIRS += opt
hidrd_HEADERS += opt.h
else
WITH_OPT_DIRECTIVE = undef
endif

if ENABLE_TOKENS
WITH_TOKENS_DIRECTIVE = define
else
WITH_TOKENS_DIRECTIVE = undef
endif

if ENABLE_NAMES
WITH_NAMES_DIRECTIVE = define
else
WITH_NAMES_DIRECTIVE = undef
endif

if ENABLE_STRM
Expand All @@ -38,3 +53,14 @@ if ENABLE_FMT
SUBDIRS += fmt
hidrd_HEADERS += fmt.h
endif

cfg.h: cfg.h.m4
m4 -DWITH_OPT_DIRECTIVE=$(WITH_OPT_DIRECTIVE) \
-DWITH_TOKENS_DIRECTIVE=$(WITH_TOKENS_DIRECTIVE) \
-DWITH_NAMES_DIRECTIVE=$(WITH_NAMES_DIRECTIVE) \
$< > $@

dist_noinst_DATA = cfg.h.m4
BUILT_SOURCES = cfg.h
CLEANFILES = $(BUILT_SOURCES)
nodist_hidrd_HEADERS = $(BUILT_SOURCES)
67 changes: 67 additions & 0 deletions include/hidrd/cfg.h.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
dnl
dnl hidrd/cfg.h template.
dnl
dnl Copyright (C) 2010 Nikolai Kondrashov
dnl
dnl This file is part of hidrd.
dnl
dnl Hidrd is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl Hidrd is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with hidrd; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
dnl
dnl @(#) $Id$
dnl
`/*
* vim:nomodifiable
*
* ********** DO NOT EDIT *************
* This file is generated from cfg.h.m4
* ************************************
*/
/** @file
* @brief HID report descriptor - configuration
*
* Copyright (C) 2010 Nikolai Kondrashov
*
* This file is part of hidrd.
*
* Hidrd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Hidrd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with hidrd; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @author Nikolai Kondrashov <[email protected]>
*/

#ifndef __HIDRD_CFG_H__
#define __HIDRD_CFG_H__

/** Defined if options library is built */
#'WITH_OPT_DIRECTIVE()` HIDRD_WITH_OPT

/** Defined if tokens should be supported across all relevant libraries */
#'WITH_TOKENS_DIRECTIVE()` HIDRD_WITH_TOKENS

/** Defined if names should be supported across all relevant libraries */
#'WITH_NAMES_DIRECTIVE()` HIDRD_WITH_NAMES

#endif /* __HIDRD_CFG_H__ */'
4 changes: 4 additions & 0 deletions include/hidrd/fmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@
#ifndef __HIDRD_FMT_H__
#define __HIDRD_FMT_H__

#include "hidrd/fmt/cfg.h"
#include "hidrd/fmt/natv.h"
#ifdef HIDRD_FMT_WITH_XML
#include "hidrd/fmt/xml.h"
#endif
#ifdef HIDRD_FMT_WITH_SPEC
#include "hidrd/fmt/spec.h"
#endif
#include "hidrd/fmt/list.h"

#endif /* __HIDRD_FMT_H__ */
25 changes: 25 additions & 0 deletions include/hidrd/fmt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,36 @@ hidrd_fmt_HEADERS = \
natv.h

if ENABLE_FMT_XML
WITH_XML_DIRECTIVE = define
SUBDIRS += xml
hidrd_fmt_HEADERS += xml.h
else
WITH_XML_DIRECTIVE = undef
endif

if ENABLE_FMT_SPEC
WITH_SPEC_DIRECTIVE = define
SUBDIRS += spec
hidrd_fmt_HEADERS += spec.h
else
WITH_SPEC_DIRECTIVE = undef
endif

if ENABLE_FMT_CODE
WITH_CODE_DIRECTIVE = define
SUBDIRS += code
hidrd_fmt_HEADERS += code.h
else
WITH_CODE_DIRECTIVE = undef
endif

cfg.h: cfg.h.m4
m4 -DWITH_XML_DIRECTIVE=$(WITH_XML_DIRECTIVE) \
-DWITH_SPEC_DIRECTIVE=$(WITH_SPEC_DIRECTIVE) \
-DWITH_CODE_DIRECTIVE=$(WITH_CODE_DIRECTIVE) \
$< > $@

dist_noinst_DATA = cfg.h.m4
BUILT_SOURCES = cfg.h
CLEANFILES = $(BUILT_SOURCES)
nodist_hidrd_fmt_HEADERS = $(BUILT_SOURCES)
Loading

0 comments on commit 6aa7929

Please sign in to comment.