Re: [dev] suckless distro

From: Anthony J. Bentley <anthony_AT_cathet.us>
Date: Wed, 25 Jun 2014 20:12:10 -0600

Sylvain BERTRAND writes:
> Using a makefile is overkill. Should be a sh script.
>
> Makefiles should be used only when there are too many source
> files to recompile for a build increment.

For an opinion that matters, try Kernighan & Pike (The Unix Programming
Environment, pg. 241):

  It's a nuisance to have to type two commands to compile a new version of
  [our example]. Although it's certainly easy to make a shell file that does
  the job, there's a better way, one that will generalize nicely later on
  when there is more than one source file in the program. ...

  make is most useful when the program being created is large enough to be
  spread over several source files, but it's handy even for something as
  small as [our example].

In other words, one advantage that make provides is a simple interface for
building any program, whether small or large. Said interface should not
come at the cost of complexity, but good makefiles are simple anyway (the
one in their example is two lines).

-- 
Anthony J. Bentley
Received on Thu Jun 26 2014 - 04:12:10 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 26 2014 - 04:24:07 CEST