[Top][All Lists]

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

Re: Could bash do what make does?

From: Robert Durkacz
Subject: Re: Could bash do what make does?
Date: Fri, 2 Dec 2016 21:29:36 +1100

I agree that is the first step to take, but I am supposing that, since build systems are a big business, some extensions to bash would be worth doing to take on that market. E.g. I think we would need a concept of lists of files so as to skip executing a command if all files in the list are older than some file that is required.

On 29 November 2016 at 02:21, Dennis Williamson <address@hidden> wrote:

On Sun, Nov 27, 2016 at 7:25 PM, Robert Durkacz <address@hidden> wrote:
Has thought been given, over the years, to extending bash to do
what make does, in the obvious way that I am about to describe?

It would be a matter of having chosen build commands do nothing if their outputs are newer than their inputs. For example that is, cc file.c -o file.o should execute normally if file.c is the newer file but do nothing if file.o is newer.

Then you would have a deterministic script to build a system that simply skipped steps determined to be unnecessary.

It is possible to achieve this without changing bash but it seems like there would be leverage in having bash deliberately support this mode.

Use the newer-than test:

[[ $source -nt $object ]] && cc "$source" -o "$object"

Visit serverfault.com to get your system administration questions answered.

reply via email to

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