Re: [dev] automating running and building

From: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Thu, 7 Jan 2016 22:23:59 -0500

On Fri, Jan 08, 2016 at 12:53:26AM +0100, hiro wrote:
> are you asking how to compile "make program; program" into a C program?

Hi Hiro. I don't know whether you are being serious or joking but that
gives me an idea which might be a solution.

Let's say that it is the cal program that I want to be automatically
compiled (iff it is not up to date) then run, every time it is called. So
I make an executable shell script called dynamic_cal that consists of

  cd $HOME/cal-source && make cal && exec ./cal "$_AT_"

After editing cal.c I run dynamic_cal and it is super automated and up to
date execution of cal that compiles if and only if necessary. Fantastic.
If I have other programs that execute cal and I want them to use
dynamic_cal I can just manipulate my PATH and make a symbolic link to make
cal dynamic. Even if some programs run cal by "/usr/bin/cal", as long as I
have permission to modify /usr/bin (which I do on my own computers), I can
make it work.

But this is all very ad-hoc and takes a lot of manual intervention and it
would be nice to make it more systematic and automated. I am very vaguely
familiar with Plan 9 (I've never used it but I've read a little bit about
it), and it seems like something Plan 9 could automate easily.
Received on Fri Jan 08 2016 - 04:23:59 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 08 2016 - 04:36:05 CET