diff --git a/CMakeLists.txt b/CMakeLists.txt index b0a522088..73faece45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,7 @@ set(AWE_MAN_SRCS set(AWE_MAN_LANGS es fr de) add_executable(${PROJECT_AWE_NAME} - ${AWE_SRCS} - ${BUILD_DIR}/common/tokenize.c) + ${AWE_SRCS}) set_target_properties(${PROJECT_AWE_NAME} PROPERTIES @@ -121,30 +120,9 @@ add_custom_command( COMMENT "Generating atoms-intern.h" VERBATIM) -# gperf -add_custom_command( - COMMAND ${SOURCE_DIR}/build-utils/gperf.sh - ARGS ${SOURCE_DIR}/common/tokenize.gperf - ${BUILD_DIR}/common/tokenize.h - OUTPUT ${BUILD_DIR}/common/tokenize.h - DEPENDS ${SOURCE_DIR}/common/tokenize.gperf - ${SOURCE_DIR}/build-utils/gperf.sh - COMMENT "Generating common/tokenize.h") - -add_custom_command( - COMMAND ${SOURCE_DIR}/build-utils/gperf.sh - ARGS ${SOURCE_DIR}/common/tokenize.gperf - ${BUILD_DIR}/common/tokenize.c - OUTPUT ${BUILD_DIR}/common/tokenize.c - DEPENDS ${SOURCE_DIR}/common/tokenize.gperf - ${SOURCE_DIR}/build-utils/gperf.sh - COMMENT "Generating common/tokenize.c") - add_custom_target(generated_sources DEPENDS ${BUILD_DIR}/common/atoms-intern.h - ${BUILD_DIR}/common/atoms-extern.h - ${BUILD_DIR}/common/tokenize.c - ${BUILD_DIR}/common/tokenize.h) + ${BUILD_DIR}/common/atoms-extern.h) # Default theme directory file(MAKE_DIRECTORY ${BUILD_DIR}/themes/default) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 7480cefe6..c657d4cc0 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -50,7 +50,6 @@ a_find_program(LN_EXECUTABLE ln TRUE) a_find_program(GREP_EXECUTABLE grep TRUE) a_find_program(GIT_EXECUTABLE git FALSE) a_find_program(HOSTNAME_EXECUTABLE hostname FALSE) -a_find_program(GPERF_EXECUTABLE gperf TRUE) # programs needed for man pages a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE) a_find_program(XMLTO_EXECUTABLE xmlto FALSE) diff --git a/build-utils/gperf.sh b/build-utils/gperf.sh deleted file mode 100755 index 96587fcfd..000000000 --- a/build-utils/gperf.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# -# Copyright © 2008 Pierre Habouzit -# -# This program 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. -# -# This program 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - - -die() { - echo "$@" 1>&2 - exit 2 -} - -do_hdr() { - cat < /dev/null - if test $? = 1 ; then - echo "gperf not found. You need to install gperf." > /dev/stderr; - exit 1; - fi; - - gperf -l -t -C -F",0" \ - --language=ANSI-C -Na_tokenize_aux <//g' -%{ -`do_hdr` - -#include -#include "common/tokenize.h" - -static const struct tok *a_tokenize_aux(const char *str, unsigned int len); - -%} -struct tok { const char *name; int val; }; -%% -`do_tokens` -%% - -awesome_token_t a_tokenize(const char *s, int len) -{ - if (len < 0) - len = (int)strlen(s); - - if (len) { - const struct tok *res = a_tokenize_aux(s, len); - return res ? res->val : A_TK_UNKNOWN; - } else { - return A_TK_UNKNOWN; - } -} -EOF -} - -extract_tokens() { - grep '^### ' "$1" | cut -d ' ' -f 2 -} - - -TOKENS_FILE="$1" -TARGET="$2" - -trap "rm -f ${TARGET}" 0 - -rm -f "${TARGET}" -case "${TARGET}" in - *.h) do_h > "${TARGET}" < "${TOKENS_FILE}" ;; - *.c) do_c > "${TARGET}" < "${TOKENS_FILE}" ;; - *) die "you must ask for the 'h' or 'c' generation";; -esac -chmod -w "${TARGET}" - -trap - 0 -exit 0 diff --git a/common/luaclass.h b/common/luaclass.h index 49080458e..db1f2cf26 100644 --- a/common/luaclass.h +++ b/common/luaclass.h @@ -23,7 +23,6 @@ #define AWESOME_COMMON_LUACLASS #include "common/signal.h" -#include "common/tokenize.h" typedef struct lua_class_property lua_class_property_t; diff --git a/objects/widget.h b/objects/widget.h index eb4b43248..e975e0453 100644 --- a/objects/widget.h +++ b/objects/widget.h @@ -24,7 +24,6 @@ #include "button.h" #include "draw.h" -#include "common/tokenize.h" typedef widget_t *(widget_constructor_t)(widget_t *); typedef void (widget_destructor_t)(widget_t *); diff --git a/objects/widgets/textbox.c b/objects/widgets/textbox.c index af7ad66e8..0d0bc77e3 100644 --- a/objects/widgets/textbox.c +++ b/objects/widgets/textbox.c @@ -21,7 +21,6 @@ #include "objects/widget.h" #include "luaa.h" -#include "common/tokenize.h" /** Padding type */ typedef struct