Changeset 573bcd0e8c35d52b0dda27d4267817f74b242cbf

Show
Ignore:
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:
11 modified

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r15d141c r573bcd0  
    2020 
    2121ifeq ($(MAKECMDGOALS),install) 
    22 $(BIN_DIRS) $(LIB_DIRS): $(GLOBAL_CWIID_DIR) 
     22$(BIN_DIRS) $(LIB_DIRS): $(CWIID_CONFIG_DIR) $(CWIID_PLUGINS_DIR) 
    2323endif 
    2424 
     
    2626        $(MAKE) $(TARGET) -C $@ 
    2727 
    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) 
    3033 
    3134distclean: 
     
    3336 
    3437uninstall: 
    35         rm -rf $(GLOBAL_CWIID_DIR); true 
     38        rm -r $(CWIID_PLUGINS_DIR); true 
    3639 
    37 .PHONY: all install clean distclean uninstall $(LIB_DIRS) $(BIN_DIRS) wmdemo 
     40uninstall_config: 
     41        rm -rf $(CWIID_CONFIG_DIR) 
     42 
     43.PHONY: all install clean distclean uninstall uninstall_config $(LIB_DIRS) \ 
     44        $(BIN_DIRS) wmdemo 
  • README

    r15d141c r573bcd0  
    3838sudo make install 
    3939 
     40While 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 
    4042Many 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: 
    41431.Add a --prefix=/usr argument to ./configure 
     
    5658See wminput/README for more information on wminput configuration and execution. 
    5759 
    58 TODO/ROADMAP 
     60FUTURE IDEAS/IMPROVEMENTS 
    5961------------------------------------------------------------------------------------------------ 
    6062The following list is neither complete nor ordered: 
  • common/include/defs.mak.in

    r15d141c r573bcd0  
    44exec_prefix = @exec_prefix@ 
    55 
    6 datarootdir = @datarootdir@ 
    7 datadir = @datadir@ 
     6sysconfdir = @sysconfdir@ 
     7libdir = @libdir@ 
    88 
    99CC = @CC@ 
     
    1212YACC = @YACC@ 
    1313 
    14 GLOBAL_CWIID_DIR = $(datadir)/CWiid 
     14CWIID_CONFIG_DIR = @CWIID_CONFIG_DIR@ 
     15CWIID_PLUGINS_DIR = @CWIID_PLUGINS_DIR@ 
    1516 
    16 CFLAGS = -g -Wall -DGLOBAL_CWIID_DIR=\"$(GLOBAL_CWIID_DIR)\" \ 
    17         -DCWIID_VERSION=\"@PACKAGE_VERSION@\" 
     17CFLAGS = -g -Wall -DCWIID_VERSION=\"@PACKAGE_VERSION@\" \ 
     18        -DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\" \ 
     19        -DCWIID_CONFIG_DIR=\"$(CWIID_CONFIG_DIR)\" 
    1820 
  • configure

    r15d141c r573bcd0  
    668668GREP 
    669669EGREP 
     670CWIID_CONFIG_DIR 
     671CWIID_PLUGINS_DIR 
    670672PKG_CONFIG 
    671673PACKAGE_CFLAGS 
     
    12541256   esac 
    12551257  cat <<\_ACEOF 
     1258 
     1259Optional 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 
    12561267 
    12571268Some influential environment variables: 
     
    42674278  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 
    42684279 
     4280fi 
     4281 
     4282 
     4283 
     4284# Check whether --with-cwiid-config-dir was given. 
     4285if test "${with_cwiid_config_dir+set}" = set; then 
     4286  withval=$with_cwiid_config_dir; 
     4287fi 
     4288 
     4289if test -z $with_cwiid_config_dir; then 
     4290        CWIID_CONFIG_DIR='${sysconfdir}/cwiid' 
     4291else 
     4292        CWIID_CONFIG_DIR=$with_cwiid_config_dir 
     4293fi 
     4294 
     4295 
     4296 
     4297# Check whether --with-cwiid-plugins-dir was given. 
     4298if test "${with_cwiid_plugins_dir+set}" = set; then 
     4299  withval=$with_cwiid_plugins_dir; 
     4300fi 
     4301 
     4302if test -n $with_cwiid_plugins_dir; then 
     4303        CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins' 
     4304else 
     4305        CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir 
    42694306fi 
    42704307 
     
    51975234GREP!$GREP$ac_delim 
    51985235EGREP!$EGREP$ac_delim 
     5236CWIID_CONFIG_DIR!$CWIID_CONFIG_DIR$ac_delim 
     5237CWIID_PLUGINS_DIR!$CWIID_PLUGINS_DIR$ac_delim 
    51995238PKG_CONFIG!$PKG_CONFIG$ac_delim 
    52005239PACKAGE_CFLAGS!$PACKAGE_CFLAGS$ac_delim 
     
    52045243_ACEOF 
    52055244 
    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 
    52075246    break 
    52085247  elif $ac_last_try; then 
  • configure.ac

    r15d141c r573bcd0  
    3535AC_ISC_POSIX 
    3636 
     37AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir], 
     38        [CWiid configuration directory, default to $(sysconfdir)/cwiid])) 
     39if test -z $with_cwiid_config_dir; then 
     40        CWIID_CONFIG_DIR='${sysconfdir}/cwiid' 
     41else 
     42        CWIID_CONFIG_DIR=$with_cwiid_config_dir 
     43fi 
     44AC_SUBST(CWIID_CONFIG_DIR) 
     45 
     46AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir], 
     47        [CWiid plugins directory, default to $(libdir)/cwiid/plugins])) 
     48if test -n $with_cwiid_plugins_dir; then 
     49        CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins' 
     50else 
     51        CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir 
     52fi 
     53AC_SUBST(CWIID_PLUGINS_DIR) 
     54 
    3755pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" 
    3856PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) 
  • wminput/Makefile.in

    r15d141c r573bcd0  
    88SOURCES = main.c conf.c uinput.c action_enum.c parser.c lexer.c util.c 
    99 
    10 CFLAGS += -I@top_builddir@/wiimote 
     10CFLAGS += -I@top_builddir@/wiimote \ 
     11        -DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" 
    1112LDLIBS = -lwiimote -ldl 
    1213LDFLAGS = -L@top_builddir@/wiimote -rdynamic 
    1314INST_DIR = @bindir@ 
     15WMINPUT_CONFIG_DIR = $(CWIID_CONFIG_DIR)/wminput 
    1416 
    1517YFLAGS = -d 
     
    2123install: install_configs 
    2224 
    23 uninstall: uninstall_configs 
     25#DON'T UNINSTALL CONFIGS 
     26#uninstall: uninstall_configs 
    2427 
    2528make_plugins: 
     
    2730 
    2831install_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 
    3336 
    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 
    4043 
    4144action_enum.c: action_enum.awk action_enum.txt 
  • wminput/main.c

    rd929df6 r573bcd0  
    4848int init; 
    4949 
    50 #ifndef GLOBAL_CWIID_DIR 
    51 #error Global plugin directory macro undefined 
    52 #endif 
    53  
    5450#define DEFAULT_CONFIG_FILE     "default" 
    5551 
    5652#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" 
    6053 
    6154#define HOME_DIR_LEN    128 
     
    9790        if ((tmp = getenv("HOME")) == NULL) { 
    9891                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; 
    10194                config_search_dirs[1] = plugin_search_dirs[1] = NULL; 
    10295        } 
     
    10699                config_search_dirs[0] = home_config_dir; 
    107100                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; 
    110103                config_search_dirs[2] = plugin_search_dirs[2] = NULL; 
    111104        } 
  • wminput/plugins/Makefile.in

    r15d141c r573bcd0  
    1313        $(MAKE) $(TARGET) -C $@ 
    1414 
    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  
    2215distclean: clean 
    2316        rm Makefile 
    2417 
    25 uninstall: $(PLUGINS) 
    26         rmdir $(GLOBAL_CWIID_DIR)/plugins; true 
    27  
    2818.PHONY: all install clean distclean uninstall $(PLUGINS) 
  • wminput/plugins/acc/Makefile.in

    r15d141c r573bcd0  
    88CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote 
    99LDLIBS = -lm 
    10 INST_DIR = $(GLOBAL_CWIID_DIR)/plugins 
     10INST_DIR = $(CWIID_PLUGINS_DIR) 
    1111 
    1212include $(COMMON)/include/plugin.mak 
  • wminput/plugins/ir_ptr/Makefile.in

    r15d141c r573bcd0  
    77SOURCES = ir_ptr.c 
    88CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote 
    9 INST_DIR = $(GLOBAL_CWIID_DIR)/plugins 
     9INST_DIR = $(CWIID_PLUGINS_DIR) 
    1010 
    1111include $(COMMON)/include/plugin.mak 
  • wminput/plugins/nunchuk_acc/Makefile.in

    r15d141c r573bcd0  
    88CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/wiimote 
    99LDLIBS = -lm 
    10 INST_DIR = $(GLOBAL_CWIID_DIR)/plugins 
     10INST_DIR = $(CWIID_PLUGINS_DIR) 
    1111 
    1212include $(COMMON)/include/plugin.mak