Changeset 573bcd0e8c35d52b0dda27d4267817f74b242cbf
- Timestamp:
- 02/24/07 16:12:04 (6 years ago)
- Author:
- dsmith <dsmith@…>
- Children:
- e0b6f65e707207cdef250393e790fdb9015f0dd4
- Parents:
- d28407e15bda0300a283b3d508ed3745a9ad6cd4
- git-author:
- L. Donnie Smith <donnie.smith@…> (02/24/07 16:12:04)
- git-committer:
- dsmith <dsmith@…> (02/24/07 16:12:04)
- Message:
-
Config, plugins directories location and uninstall
git-svn-id: http://abstrakraft.org/cwiid/svn/cwiid/trunk@8 918edb2d-ff29-0410-9de2-eb38e7f22bc7
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r15d141c
|
r573bcd0
|
|
| 20 | 20 | |
| 21 | 21 | ifeq ($(MAKECMDGOALS),install) |
| 22 | | $(BIN_DIRS) $(LIB_DIRS): $(GLOBAL_CWIID_DIR) |
| | 22 | $(BIN_DIRS) $(LIB_DIRS): $(CWIID_CONFIG_DIR) $(CWIID_PLUGINS_DIR) |
| 23 | 23 | endif |
| 24 | 24 | |
| … |
… |
|
| 26 | 26 | $(MAKE) $(TARGET) -C $@ |
| 27 | 27 | |
| 28 | | $(GLOBAL_CWIID_DIR): |
| 29 | | mkdir -p $(GLOBAL_CWIID_DIR) |
| | 28 | $(CWIID_CONFIG_DIR): |
| | 29 | mkdir -p $(CWIID_CONFIG_DIR) |
| | 30 | |
| | 31 | $(CWIID_PLUGINS_DIR): |
| | 32 | mkdir -p $(CWIID_PLUGINS_DIR) |
| 30 | 33 | |
| 31 | 34 | distclean: |
| … |
… |
|
| 33 | 36 | |
| 34 | 37 | uninstall: |
| 35 | | rm -rf $(GLOBAL_CWIID_DIR); true |
| | 38 | rm -r $(CWIID_PLUGINS_DIR); true |
| 36 | 39 | |
| 37 | | .PHONY: all install clean distclean uninstall $(LIB_DIRS) $(BIN_DIRS) wmdemo |
| | 40 | uninstall_config: |
| | 41 | rm -rf $(CWIID_CONFIG_DIR) |
| | 42 | |
| | 43 | .PHONY: all install clean distclean uninstall uninstall_config $(LIB_DIRS) \ |
| | 44 | $(BIN_DIRS) wmdemo |
-
|
r15d141c
|
r573bcd0
|
|
| 38 | 38 | sudo make install |
| 39 | 39 | |
| | 40 | While CWiid is still in the early development stages, installation directories and filenames are changed more often than in a mature, stable package. In order to prevent the collection of obselete directories and files, it is recommended that you run 'make uninstall && make uninstall_config' from your current CWiid source directory before installing a new one. |
| | 41 | |
| 40 | 42 | Many distributions do not have /usr/local/lib in the library search path, and on many of these same distributions, the library installation directory (as determined by autoconf) is /usr/local/lib, creating a problem when you try to run programs depending on libraries installed there. There are two clean ways to fix this: |
| 41 | 43 | 1.Add a --prefix=/usr argument to ./configure |
| … |
… |
|
| 56 | 58 | See wminput/README for more information on wminput configuration and execution. |
| 57 | 59 | |
| 58 | | TODO/ROADMAP |
| | 60 | FUTURE IDEAS/IMPROVEMENTS |
| 59 | 61 | ------------------------------------------------------------------------------------------------ |
| 60 | 62 | The following list is neither complete nor ordered: |
-
|
r15d141c
|
r573bcd0
|
|
| 4 | 4 | exec_prefix = @exec_prefix@ |
| 5 | 5 | |
| 6 | | datarootdir = @datarootdir@ |
| 7 | | datadir = @datadir@ |
| | 6 | sysconfdir = @sysconfdir@ |
| | 7 | libdir = @libdir@ |
| 8 | 8 | |
| 9 | 9 | CC = @CC@ |
| … |
… |
|
| 12 | 12 | YACC = @YACC@ |
| 13 | 13 | |
| 14 | | GLOBAL_CWIID_DIR = $(datadir)/CWiid |
| | 14 | CWIID_CONFIG_DIR = @CWIID_CONFIG_DIR@ |
| | 15 | CWIID_PLUGINS_DIR = @CWIID_PLUGINS_DIR@ |
| 15 | 16 | |
| 16 | | CFLAGS = -g -Wall -DGLOBAL_CWIID_DIR=\"$(GLOBAL_CWIID_DIR)\" \ |
| 17 | | -DCWIID_VERSION=\"@PACKAGE_VERSION@\" |
| | 17 | CFLAGS = -g -Wall -DCWIID_VERSION=\"@PACKAGE_VERSION@\" \ |
| | 18 | -DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\" \ |
| | 19 | -DCWIID_CONFIG_DIR=\"$(CWIID_CONFIG_DIR)\" |
| 18 | 20 | |
-
|
r15d141c
|
r573bcd0
|
|
| 668 | 668 | GREP |
| 669 | 669 | EGREP |
| | 670 | CWIID_CONFIG_DIR |
| | 671 | CWIID_PLUGINS_DIR |
| 670 | 672 | PKG_CONFIG |
| 671 | 673 | PACKAGE_CFLAGS |
| … |
… |
|
| 1254 | 1256 | esac |
| 1255 | 1257 | cat <<\_ACEOF |
| | 1258 | |
| | 1259 | Optional Packages: |
| | 1260 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| | 1261 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| | 1262 | --with-cwiid-config-dir CWiid configuration directory, default to |
| | 1263 | $(sysconfdir)/cwiid |
| | 1264 | --with-cwiid-plugins-dir |
| | 1265 | CWiid plugins directory, default to |
| | 1266 | $(libdir)/cwiid/plugins |
| 1256 | 1267 | |
| 1257 | 1268 | Some influential environment variables: |
| … |
… |
|
| 4267 | 4278 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 4268 | 4279 | |
| | 4280 | fi |
| | 4281 | |
| | 4282 | |
| | 4283 | |
| | 4284 | # Check whether --with-cwiid-config-dir was given. |
| | 4285 | if test "${with_cwiid_config_dir+set}" = set; then |
| | 4286 | withval=$with_cwiid_config_dir; |
| | 4287 | fi |
| | 4288 | |
| | 4289 | if test -z $with_cwiid_config_dir; then |
| | 4290 | CWIID_CONFIG_DIR='${sysconfdir}/cwiid' |
| | 4291 | else |
| | 4292 | CWIID_CONFIG_DIR=$with_cwiid_config_dir |
| | 4293 | fi |
| | 4294 | |
| | 4295 | |
| | 4296 | |
| | 4297 | # Check whether --with-cwiid-plugins-dir was given. |
| | 4298 | if test "${with_cwiid_plugins_dir+set}" = set; then |
| | 4299 | withval=$with_cwiid_plugins_dir; |
| | 4300 | fi |
| | 4301 | |
| | 4302 | if test -n $with_cwiid_plugins_dir; then |
| | 4303 | CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins' |
| | 4304 | else |
| | 4305 | CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir |
| 4269 | 4306 | fi |
| 4270 | 4307 | |
| … |
… |
|
| 5197 | 5234 | GREP!$GREP$ac_delim |
| 5198 | 5235 | EGREP!$EGREP$ac_delim |
| | 5236 | CWIID_CONFIG_DIR!$CWIID_CONFIG_DIR$ac_delim |
| | 5237 | CWIID_PLUGINS_DIR!$CWIID_PLUGINS_DIR$ac_delim |
| 5199 | 5238 | PKG_CONFIG!$PKG_CONFIG$ac_delim |
| 5200 | 5239 | PACKAGE_CFLAGS!$PACKAGE_CFLAGS$ac_delim |
| … |
… |
|
| 5204 | 5243 | _ACEOF |
| 5205 | 5244 | |
| 5206 | | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then |
| | 5245 | if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then |
| 5207 | 5246 | break |
| 5208 | 5247 | elif $ac_last_try; then |
-
|
r15d141c
|
r573bcd0
|
|
| 35 | 35 | AC_ISC_POSIX |
| 36 | 36 | |
| | 37 | AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir], |
| | 38 | [CWiid configuration directory, default to $(sysconfdir)/cwiid])) |
| | 39 | if test -z $with_cwiid_config_dir; then |
| | 40 | CWIID_CONFIG_DIR='${sysconfdir}/cwiid' |
| | 41 | else |
| | 42 | CWIID_CONFIG_DIR=$with_cwiid_config_dir |
| | 43 | fi |
| | 44 | AC_SUBST(CWIID_CONFIG_DIR) |
| | 45 | |
| | 46 | AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir], |
| | 47 | [CWiid plugins directory, default to $(libdir)/cwiid/plugins])) |
| | 48 | if test -n $with_cwiid_plugins_dir; then |
| | 49 | CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins' |
| | 50 | else |
| | 51 | CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir |
| | 52 | fi |
| | 53 | AC_SUBST(CWIID_PLUGINS_DIR) |
| | 54 | |
| 37 | 55 | pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" |
| 38 | 56 | PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) |
-
|
r15d141c
|
r573bcd0
|
|
| 8 | 8 | SOURCES = main.c conf.c uinput.c action_enum.c parser.c lexer.c util.c |
| 9 | 9 | |
| 10 | | CFLAGS += -I@top_builddir@/wiimote |
| | 10 | CFLAGS += -I@top_builddir@/wiimote \ |
| | 11 | -DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" |
| 11 | 12 | LDLIBS = -lwiimote -ldl |
| 12 | 13 | LDFLAGS = -L@top_builddir@/wiimote -rdynamic |
| 13 | 14 | INST_DIR = @bindir@ |
| | 15 | WMINPUT_CONFIG_DIR = $(CWIID_CONFIG_DIR)/wminput |
| 14 | 16 | |
| 15 | 17 | YFLAGS = -d |
| … |
… |
|
| 21 | 23 | install: install_configs |
| 22 | 24 | |
| 23 | | uninstall: uninstall_configs |
| | 25 | #DON'T UNINSTALL CONFIGS |
| | 26 | #uninstall: uninstall_configs |
| 24 | 27 | |
| 25 | 28 | make_plugins: |
| … |
… |
|
| 27 | 30 | |
| 28 | 31 | install_configs: |
| 29 | | mkdir -p $(GLOBAL_CWIID_DIR)/wminput |
| 30 | | cp configs/* $(GLOBAL_CWIID_DIR)/wminput |
| 31 | | ln -sf $(GLOBAL_CWIID_DIR)/wminput/acc_ptr \ |
| 32 | | $(GLOBAL_CWIID_DIR)/wminput/default |
| | 32 | mkdir -p $(WMINPUT_CONFIG_DIR) |
| | 33 | cp configs/* $(WMINPUT_CONFIG_DIR) |
| | 34 | ln -sf $(WMINPUT_CONFIG_DIR)/acc_ptr \ |
| | 35 | $(WMINPUT_CONFIG_DIR)/default |
| 33 | 36 | |
| 34 | | uninstall_configs: |
| 35 | | rm -f $(GLOBAL_CWIID_DIR)/wminput/default |
| 36 | | for c in `ls configs`; do \ |
| 37 | | rm -f $(GLOBAL_CWIID_DIR)/wminput/$$c; \ |
| 38 | | done |
| 39 | | rmdir $(GLOBAL_CWIID_DIR)/wminput; true |
| | 37 | #uninstall_configs: |
| | 38 | # rm -f $(WMINPUT_CONFIG_DIR)/default |
| | 39 | # for c in `ls configs`; do \ |
| | 40 | # rm -f $(WMINPUT_CONFIG_DIR)/$$c; \ |
| | 41 | # done |
| | 42 | # rmdir $(WMINPUT_CONFIG_DIR); true |
| 40 | 43 | |
| 41 | 44 | action_enum.c: action_enum.awk action_enum.txt |
-
|
rd929df6
|
r573bcd0
|
|
| 48 | 48 | int init; |
| 49 | 49 | |
| 50 | | #ifndef GLOBAL_CWIID_DIR |
| 51 | | #error Global plugin directory macro undefined |
| 52 | | #endif |
| 53 | | |
| 54 | 50 | #define DEFAULT_CONFIG_FILE "default" |
| 55 | 51 | |
| 56 | 52 | #define USAGE "usage:%s [-h] [-c config] [bdaddr]\n" |
| 57 | | |
| 58 | | #define GLOBAL_CONFIG_DIR GLOBAL_CWIID_DIR "/wminput" |
| 59 | | #define GLOBAL_PLUGIN_DIR GLOBAL_CWIID_DIR "/plugins" |
| 60 | 53 | |
| 61 | 54 | #define HOME_DIR_LEN 128 |
| … |
… |
|
| 97 | 90 | if ((tmp = getenv("HOME")) == NULL) { |
| 98 | 91 | wminput_err("unable to find home directory"); |
| 99 | | config_search_dirs[0] = GLOBAL_CONFIG_DIR; |
| 100 | | plugin_search_dirs[0] = GLOBAL_PLUGIN_DIR; |
| | 92 | config_search_dirs[0] = WMINPUT_CONFIG_DIR; |
| | 93 | plugin_search_dirs[0] = CWIID_PLUGINS_DIR; |
| 101 | 94 | config_search_dirs[1] = plugin_search_dirs[1] = NULL; |
| 102 | 95 | } |
| … |
… |
|
| 106 | 99 | config_search_dirs[0] = home_config_dir; |
| 107 | 100 | plugin_search_dirs[0] = home_plugin_dir; |
| 108 | | config_search_dirs[1] = GLOBAL_CONFIG_DIR; |
| 109 | | plugin_search_dirs[1] = GLOBAL_PLUGIN_DIR; |
| | 101 | config_search_dirs[1] = WMINPUT_CONFIG_DIR; |
| | 102 | plugin_search_dirs[1] = CWIID_PLUGINS_DIR; |
| 110 | 103 | config_search_dirs[2] = plugin_search_dirs[2] = NULL; |
| 111 | 104 | } |
-
|
r15d141c
|
r573bcd0
|
|
| 13 | 13 | $(MAKE) $(TARGET) -C $@ |
| 14 | 14 | |
| 15 | | ifeq ($(MAKECMDGOALS), install) |
| 16 | | $(PLUGINS): $(GLOBAL_CWIID_DIR)/plugins |
| 17 | | endif |
| 18 | | |
| 19 | | $(GLOBAL_CWIID_DIR)/plugins: |
| 20 | | mkdir -p $(GLOBAL_CWIID_DIR)/plugins |
| 21 | | |
| 22 | 15 | distclean: clean |
| 23 | 16 | rm Makefile |
| 24 | 17 | |
| 25 | | uninstall: $(PLUGINS) |
| 26 | | rmdir $(GLOBAL_CWIID_DIR)/plugins; true |
| 27 | | |
| 28 | 18 | .PHONY: all install clean distclean uninstall $(PLUGINS) |
-
|
r15d141c
|
r573bcd0
|
|
| 8 | 8 | CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote |
| 9 | 9 | LDLIBS = -lm |
| 10 | | INST_DIR = $(GLOBAL_CWIID_DIR)/plugins |
| | 10 | INST_DIR = $(CWIID_PLUGINS_DIR) |
| 11 | 11 | |
| 12 | 12 | include $(COMMON)/include/plugin.mak |
-
|
r15d141c
|
r573bcd0
|
|
| 7 | 7 | SOURCES = ir_ptr.c |
| 8 | 8 | CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote |
| 9 | | INST_DIR = $(GLOBAL_CWIID_DIR)/plugins |
| | 9 | INST_DIR = $(CWIID_PLUGINS_DIR) |
| 10 | 10 | |
| 11 | 11 | include $(COMMON)/include/plugin.mak |
-
|
r15d141c
|
r573bcd0
|
|
| 8 | 8 | CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote |
| 9 | 9 | LDLIBS = -lm |
| 10 | | INST_DIR = $(GLOBAL_CWIID_DIR)/plugins |
| | 10 | INST_DIR = $(CWIID_PLUGINS_DIR) |
| 11 | 11 | |
| 12 | 12 | include $(COMMON)/include/plugin.mak |