Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 10:11:45 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: answering questions spilled out from gmake processes
Message-ID:  <44d2got0pq.fsf@be-well.ilk.org>
In-Reply-To: <20140411052540.GA1817@La-Habana> (Matthias Apitz's message of "Fri, 11 Apr 2014 07:25:40 %2B0200")
References:  <20140411052540.GA1817@La-Habana>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Apitz <guru@unixarea.de> writes:

> Hello,
>
> I have a huge gmake process to compile a lot of OpenSource tools, mostly
> Perl modules etc. All this is driven by a master Makefile. Some of the
> make processes are asking questions which I do not have under my control and
> would require to change the fetched source trees, for example:
>
> ...
> Test for foo failed, do you want to continue (y/n):
>
> These questions forbit to run this with nohup in background or
> unattendend. I was thinking to use chat(1) or any other own written tool
> and run the proc in an xterm like:
>
> chat < Xterm.log | gmake 
>
> were Xterm.log is the log of the X-terminal and chat is reading the
> question there '...want to continue (y/n)' and sends the correct answer.
>
> Any other idea?

There are different approaches to this, depending on the kinds of
changes needed. As an example of how many kinds of settings could
theoretically be needed, look at the types of patches, configure flags,
and so on (and on) in the FreeBSD ports system. Other approaches to the
same problem (e.g., OpenEmbedded) show fairly similar numbers and types
of modifications, so I don't think there's a general-purpose way around
it. If you possibly can, leverage an existing porting framework; since
you're asking on freebsd-questions, the ports system is probably the
first candidate. 

The scripted approach will be fragile and fiddly, but if you're going to
try it, something like expect will probably be easier than chat().



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44d2got0pq.fsf>