help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is this not working (apply + call-process + list of string args)


From: Bruno Barbier
Subject: Re: Why is this not working (apply + call-process + list of string args)?
Date: Thu, 15 Sep 2022 19:00:44 +0200

Arthur Miller <arthur.miller@live.com> writes:

> I just wonder if someone can explain exact what is going on here:
>
> I have a list of strings of arruments I try to pass to configure script. It
> looks something like this:
>
> #+begin_src emacs-lisp
> (defvar args
> '("--with-native-compilation "
>      "--with-x "
>      "--with-x-toolkit=no "
>      "--without-gconf "
>      "--without-gsettings "
>      "--with-cairo "
>      "--without-toolkit-scroll-bars "
>      "--with-xinput2 "
>      "--without-included-regex "
>      "--without-compress-install "))
>
> (defun configure (&rest args)
>   (apply #'call-process
>   (expand-file-name "./configure")
>   nil build-log nil args))
>
> (apply #'configure args)
> #end_src
>
> However it does not work, configure script seems to see wrong arguments.

Why do you have a space after each option ?

In my case, configure sees "--with-native-compilation ", not
"--with-native-compilation" and complains:

  configure: error: invalid package name: `native-compilation '
                                                             ^

Note that you should use a prefix for your own variables/commands names
to not break your emacs (replace existing ones).

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]