package guile: tidy up test program

This commit is contained in:
Tony Theodore 2013-03-04 03:03:13 +11:00
parent c2b04c0175
commit c5ce2ec4e3
2 changed files with 3 additions and 6 deletions

View File

@ -11,9 +11,6 @@
int putenv (char *);
# endif
#define xstr(s) str(s)
#define str(s) #s
static void inner_main(void *data, int argc, char *argv[])
{
(void)data;
@ -26,7 +23,7 @@ int main(int argc, char *argv[])
{
char guile_load_path[40];
snprintf(guile_load_path, sizeof guile_load_path, \
"GUILE_LOAD_PATH=..\\share\\guile\\%s", xstr(GUILE_MAJOR_MINOR));
"GUILE_LOAD_PATH=..\\share\\guile\\%s", GUILE_MAJOR_MINOR);
putenv(guile_load_path);
scm_boot_guile(argc, argv, inner_main, NULL);
return 0;

View File

@ -35,6 +35,6 @@ define $(PKG)_BUILD
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \
`'$(TARGET)-pkg-config' guile-1.8 --cflags --libs` \
-DGUILE_MAJOR_MINOR=$(call SHORT_PKG_VERSION,$(PKG))
`'$(TARGET)-pkg-config' guile-$(call SHORT_PKG_VERSION,$(PKG)) --cflags --libs` \
-DGUILE_MAJOR_MINOR=\"$(call SHORT_PKG_VERSION,$(PKG))\"
endef