From e2c6f2eea4792732e1dbb1873cf7860eb252c97a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Oct 2009 22:00:30 -0400 Subject: rework rvs's build system, currently, it doesn't build :( it fails on the plugins, the wrapper works fine --- wrapper/main.mk.in | 2 +- wrapper/runcom.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'wrapper') 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; } -- cgit v1.2.3-2-g168b