summaryrefslogtreecommitdiff
path: root/wrapper
diff options
context:
space:
mode:
authorLuke Shumaker <luke@HP-dv6426us-u904.(none)>2009-10-29 22:00:30 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:18 -0600
commite2c6f2eea4792732e1dbb1873cf7860eb252c97a (patch)
tree65099b6522a68900fb72d709d947936f74ad5140 /wrapper
parentcb6084afd1c7928f75f56d2667b894cf5c407b61 (diff)
rework rvs's build system, currently, it doesn't build :(
it fails on the plugins, the wrapper works fine
Diffstat (limited to 'wrapper')
-rw-r--r--wrapper/main.mk.in2
-rw-r--r--wrapper/runcom.c15
2 files changed, 11 insertions, 6 deletions
diff --git a/wrapper/main.mk.in b/wrapper/main.mk.in
index 7959612..7d9cc19 100644
--- a/wrapper/main.mk.in
+++ b/wrapper/main.mk.in
@@ -28,7 +28,7 @@ CFLAGS = -g \
-Dplugin_conf=\"plugin.conf\"
# phony targets ####################################################
-all : rvs runcom Makefiles
+all : Makefiles rvs runcom
.PHONY : install uninstall clean distclean dist install-runcom
.SUFFIXES : .c .o
VPATH = $(srcdir)/wrapper
diff --git a/wrapper/runcom.c b/wrapper/runcom.c
index 5928bb3..30603a2 100644
--- a/wrapper/runcom.c
+++ b/wrapper/runcom.c
@@ -41,15 +41,20 @@ main ( int argc, char *argv[] )
plugins=load_plugins(stdin);
struct plugin_command_list *list;
if ( strchr(argv[1],'/') == NULL )
+ /* this is a normal command */
list=plugin_find_commands(plugins,argv[1]);
else {
/* this is a command for a specific plugin */
- list=xmalloc(sizeof(*list));
- list->command=plugin_depend_parse(stralloc(argv[1]));
- list->next=NULL;
+
+ list=xmalloc(sizeof(*list)); list->next=NULL;
+
+ list->command=plugin_depend_parse(
+ // | command-name |plugins|ret if name==""|
+ stralloc(argv[1]),plugins,NULL);
if ( list->command == NULL ) {
- /* plugin_depend_parse should fail the program*\
- \* on its own, but just to be safe... */
+ // `command->list' should be NULL if
+ // no plugin/command was found
+ // no command was specified (argv[1]=="")
plugin_free_list(list);
list=NULL;
}