1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/libguile/guile-tools.c
Michael Gran 08e1876d71 Add compiled guile-tools program
For systems that do not have a posix shell.

* configure.ac (GUILE_TOOLS_EXE): new conditional
* libguile/Makefile.am (guile-tools)[GUILE_TOOLS_EXE]: new binary target
* libguile/guile-tools.c: new file
* meta/Makefile.am (guile.scm): new data
  [!GUILE_TOOLS_EXE](install-exec-hook): don't alias guile-tools to guild
  (CLEANFILES): add guild.exe
2025-03-30 18:50:51 -07:00

25 lines
458 B
C

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <locale.h>
#include <stdio.h>
#include <libguile.h>
static void
inner_main (void *closure SCM_UNUSED, int argc, char **argv)
{
SCM mainproc;
scm_c_use_module ("guild");
mainproc = scm_c_private_ref("guild", "main");
scm_call_1 (mainproc, scm_program_arguments());
}
int main(int argc, char **argv)
{
setlocale (LC_ALL, "");
scm_boot_guile (argc, argv, inner_main, 0);
return 0;
}