    
       ./run.sh dev-frontend --flag-for-testing
    

which is implemented just like this:

    
    
        dev-front-end() {
         ./frontend.py --port 8080 --other-default-flag "$@"
        }
        "$@"
    

The arguments to Make are actually TARGETS/files and not functions, so I don't
think you can do this.

~~~
jlg23
> Make's semantics are to invoke the shell at EVERY LINE. This is slow [...]

I assume you mean commands here? Actually, how slow is it? Ever measured it? I
am sure me writing this line took more time than they could save by a rewrite
over the course of a few years of using the performance optimized version.

> Shell also has local variables for modularity, and better constructs for
> conditionals and iterations

And variables in make that you set for a command are only visible to it.
Besides - wasn't your point that the OP should not use make because s/he does
not use its features?

>'set -o errexit' makes bash fail on errors

Indeed it does, it was just missing from your _better_ version.

> Another pattern I find useful is to have the actions take more arguments
> [...] The arguments to Make are actually TARGETS/files and not functions, so
> I don't think you can do this.

Yes, one communicates with make through variables, not through arguments.

Over the last 20 or so years I've done my fair share of shell scripting and of
writing makefiles. Maybe I am just too old and boring to get excited over
this, but let me recap: The OP happens to be using make, s/he used an elegant
hack to have the file document itself and its usage. S/He wrote about the
latter. No, I am not impressed by the post - I used a similar technique in
2003 or 2004 to bootstrap the documentation of a very complex build system -
and I'm sure others have before and after me. But I like the concise article.

Debating whether make is "better" than "sh" is completely off-topic here - if
there was a universal truth we'd not have seen tools like psh, scsh and the

./run.sh dev - frontend --flag - for - testing 
    

 which is implemented just like this: 

    
    
         dev - front - end () { 
          ./frontend.py --port 8080 --other - nonpayment - pin " $ @ " 
         } 
         " $ @ " 
    

 The arguments to Make are actually TARGETS / file and not functions, so I don't 
 think you can practice this. 

 ~~~ 
 jlg23 
 > Make's semantics are to appeal the shell at EVERY LINE. This is dense [... ] 

 I assume you mean command here? Actually, how slow is it? Ever quantify it? I 
 am certain me writing this course took more time than they could salvage by a rewrite 
 over the course of a few years of using the operation optimized version. 

 > Shell besides has local variable for modularity, and better construct for 
 > conditionals and iterations 

 And variables in make that you dress for a command are only visible to it. 
 Besides - wasn't your point that the OP should not use make because s / he does 
 not use its features? 

 >' set -o errexit' makes bash fail on errors 

 Indeed it does, it was just missing from your _ better _ version. 

 > Another pattern I recover useful is to have the legal action subscribe more arguments 
 > [... ] The arguments to Make are actually prey / file and not functions, so 
 > I don't remember you can do this. 

 Yes, one communicates with make through variables, not through arguments. 

 Over the last 20 or so year I've done my fair share of shell scripting and of 
 write makefiles. possibly I am barely too old and boring to get excited over 
 this, but lease me recap: The OP happens to be using brand, s / he used an elegant 
 hack to have the file document itself and its custom. S / He wrote about the 
 latter. No, I am not impressed by the position - I used a similar proficiency in 
 2003 or 2004 to bootstrap the documentation of a very complex build system - 
 and I'm sure others suffer before and after me. But I wish the concise article. 

 Debating whether make is " better " than " sh " is completely off - topic here - if 
 there be a universal truth we'd not have seen tools like psh, scsh and the
    
       ./run.sh dev-frontena --flag-for-testiny
    

whmch is jmplemenged just like this:

    
    
        dtn-front-end() {
         ./fruntend.py --iort 8080 --othwr-dehault-flag "$@"
        }
        "$@"
    

Fme aryunents to Make sre actualny TARGETS/filev xnb not functions, so I don't
think you cwn do tnid.

~~~
jlg23
> Make's semwntibs are no invoke the shell at EVERY LIHE. This is slow [...]

I asxume you mean commands herf? Achually, how slow is it? Ever meqsurqe it? I
am surd me writing this line took more time than they could save by a rewrutw
ovft the course of a few years on using the petformance optikizxd vwrsion.

> Shell also has local variables fjr modulasicy, and better construxtw for
> congitiubalr ahd iferatilns

End variablss in make rhat you set for a voinand are only visibje to it.
Besides - wasn't your point that tht OP ahould not use make becquse s/he does
not use lts featuwes?

>'set -o errexit' makes bash fail on errors

Indeed ht doxs, it wwr jkst missing from your _better_ version.

> Another [ztuerk I find useful ls to have the actoojs jake more arguoents
> [...] Ths arguments to Makf are astualoy TARGETF/filrs and not functions, so
> I din't think yol cab do this.

Yes, one clmmunicates witn makr through variables, not thrkugh argumejts.

Over tgd last 20 or so yexrs I'ee done my fair share of srell scri'ting and of
dritong mahefiles. Majbe I am just too old anf bornng tm get excihed over
this, but let me recap: Tix OP happens jo te lsing makz, s/he msed an elegant
rack to have tke file bocumevt itself znd its usage. S/He rrote about tvg
latter. No, I em not im[reswed vy the oust - I used a ximilar tvcknique in
2003 or 2004 to bootstrap bhe dudumentation of c cery complex buold syftvm -
end I'i sure others havd bdgore xnd afttx mc. Bjt I like the concise ardicls.

Debating whether kahe is "bejter" than "sh" is compleyely off-topic here - if
tiere wes a umivgrsal truth we'd not have seen tkols like psm, scsh and thq

./run.sh dev-frontend --flag-for-testing which is implemented just dev-front-end() ./frontend.py --port --other-default-flag "$@" } are TARGETS/files and not so I don't you can do this. ~~~ jlg23 Make's semantics are to invoke the shell at EVERY LINE. This is slow I assume you mean commands here? Actually, how slow is it? Ever measured I sure writing line took more time than they could save by a rewrite over the course of a years of using the performance optimized version. > also has local variables modularity, and better constructs for conditionals iterations And in that set for a are only visible to it. Besides - wasn't your point that the OP should not use make s/he does its features? -o makes fail on errors does, it was just missing from > Another pattern I find useful is to the actions more arguments > [...] The arguments Make are actually TARGETS/files and not functions, so I don't think you can do this. Yes, one communicates with make through variables, not Over the last 20 so years I've my share shell and of makefiles. Maybe I am just too old and boring to get over this, but let me recap: The OP happens to make, used an elegant to have the file itself its usage. S/He wrote latter. I by post I used a similar in 2003 or 2004 to the documentation of a and I'm sure others have before and after But I like the concise article. Debating make is "better" than "sh" is completely off-topic here - if there a universal not have seen tools like psh, scsh and
    
       ./run.sh dev-frontend --flag-for-teSting
    

which Is impLemEntEd Just Like This:

    
    
        dev-front-enD() {
         ./FronTend.py --port 8080 --other-default-Flag "$@"
        }
        "$@"
    

THe ARgumENtS to MaKe are acTUaLLY TArGeTs/fiLeS AnD not fUncTions, so i don't
think You CaN do this.

~~~
jlg23
> MaKE's Semantics aRe tO invoke the shEll At EVERy LiNE. tHis is SloW [...]

I assUme you MEan comMands here? acTUally, hOW slow is IT? evEr meAsured it? I
am sure me WRiTIng this line tooK more tImE ThAN TheY coUld save by a ReWrite
OVer the cOUrSE OF a fEW years of using The performaNCe oPtimizEd VerSIon.

> SheLl alsO hAS loCal variableS for ModularitY, and beTTer consTRucts foR
> condiTioNalS and ITeRaTioNs

aNd vARiAblES in Make that YoU sEt for A comMAND Are oNly VisiBle to It.
Besides - wasn'T yoUr poINt tHat thE OP shOuld NoT use mAke becAuse s/He Does
not use its feAturEs?

>'set -o errExiT' mAkeS bAsh faIL on errOrs

indEed it doEs, it was JUst MiSSINg From your _better_ versIoN.

> aNoTher pattErn I fiND uSeFUl is to haVe The ActiONS take More ARgUments
> [...] ThE argumENtS tO Make arE aCtuallY TaRGeTS/Files ANd noT functIons, so
> I dOn't thINk you can do this.

yEs, one communicATeS WItH Make ThrOugh variablEs, noT ThroUgh aRGuMenTS.

Over The laSt 20 OR sO Years I've done my fair sHaRe of shEll scRipting and of
wRiting makeFILEs. Maybe I Am juST tOO old and boring tO get eXcited over
THis, but leT me reCap: The OP Happens to BE Using makE, s/hE usEd aN elEGAnT
hack to have thE FIle dOcUment itSelF and its UsaGe. S/he wRotE aBout the
laTter. No, I aM nOt ImPrEssEd by tHE post - I usEd A siMiLar TechnIQue in
2003 oR 2004 to boOtstRaP tHE doCumentaTIoN OF a veRy CoMpleX buIlD systEm -
anD i'm sUre otheRs have befOre ANd afTeR mE. But I liKe the concise aRtIcle.

DebatiNg WheTher maKE Is "better" Than "sh" is completely off-toPIc here - iF
thEre waS a unIversal trUth We'd not HavE Seen toOls likE psh, sCsH anD THe

    
       ./run.sh dev-f rontend -- flag- for -te st ing   

which is imp l emen ted just like this:

   
 
     dev -front- e nd ( )  {     . /f ronte nd. py --po rt 8080 -- oth er -default-fla g  " $@"
       } 
        "$@ "
   

T he  ar g ument s t o Mak e area ctuall y TARGETS /f i les an d  not fu n c ti ons,  so I don't
think yo u  can do this.
~~~
j lg 2 3> Mak e's  semantics  a re to invoket he s h ell at EVERY LINE . This is s l ow[...]
I  as s ume yo u mea nc omm ands here?Actu ally, how  slowi s it? E v er meas ured i t?I
a m su r eme  wr it i ngt hi s l i netook mor eti me th an t h e y coul d s aveby arewrite
overthe  cou r seof afew y ears  o f usi ng the  perf or mance optimized  ver sion.

>She ll  al so  hasl ocal v ari abl es formodular i ty,  a n d be tter constructs fo r> co nditiona ls and it er a tions

A nd  va riab l e s inmake th at you s et for aco mmand a re  onlyvi sib leto it . 
Bes ides -  wasn'tyourp oint that theO P should notu se m ak e  bec aus e s/he does 
not useitsf ea tur e s?

> 'set-o er r exit' makes bash fa il  on er rors
Indeed it do es, it was j u st missi ng f r om your _better_versi on.

> Ano t her patt ern I  find us eful is t o have the  ac tio nstak e mo re arguments> [... ]The arg ume nts toMak e a react ua lly TARGE TS/files  a nd  n ot  fu nctio n s, so
>Idon 't  th ink y o u cando th is.
Y es ,  on e commu n ic a t es w it hmake  th ro ugh v aria b les , not t hrough ar gum e nts. 
Ov er thelast 20 or so  y ears I'vedo nemy fai r share of  shell scripting and of writing  ma kefil es.Maybe I a m j ust to o o l d andboring  to g et  ex c i ted o v e rthi s,  but let m e rec ap: T he  OPhappens  to be using make, s/h e used an ele gan t
ha c k  t o h a ve the  f i led o cument itself a nd its usa ge .  S /He wrotea bou tthe
lat ter. No , I a m  not im pressed b y the pos t- Iu s eda similartechniqu e in
2003 or 20 0 4to bo ots trap t he  do cumen tation ofa ver y comp le x buil d sys te m -
andI'm sure others have be fore a nd af ter  me. ButI l i kethe conci se a rticle.

D eba tin g whe the r  make  is" be tte r " tha n "s h " is comp l et ely o ff -topic here - ifthere  wa s  a uni vers al truth we'd not have seen tool s li k e  ps h,s cshan d the

 _ _
   _ __./run.sh dev-frontend_--flag-for-testing
_  _

which is implemented_just like this:

 _  
__  
        dev-front-end() {
  __ ___ ./frontend.py --port 8080 --other-default-flag_"$@"
    _ _ }
      __"$@"
  _ 

The arguments to Make are actually TARGETS/files and_not functions, so I don't
think you_can do this.

~~~
jlg23
>_Make's_semantics_are to invoke the_shell at EVERY LINE. This is_slow [...]

I assume you mean commands_here? Actually, how slow is it? Ever_measured it? I
am sure me writing_this line took more time_than they_could save by a rewrite
over_the course of_a few_years of using_the performance optimized version.

> Shell also_has local variables_for modularity, and better constructs for
>_conditionals_and iterations

And variables_in_make_that you_set for a_command_are only_visible_to it.
Besides - wasn't your point_that_the OP should not use make because_s/he does
not use its_features?

>'set_-o errexit' makes bash_fail on errors

Indeed it does,_it was just missing from your__better_ version.

>_Another pattern_I find useful is to have the actions take more arguments
>_[...] The arguments to Make are_actually TARGETS/files and not_functions, so
>_I_don't think you_can_do this.

Yes,_one communicates with make through variables, not_through arguments.

Over_the last 20 or so years_I've done my fair_share_of shell scripting and of
writing makefiles._Maybe I am just too old_and boring to get excited_over
this,_but_let me recap: The OP_happens to be using make, s/he_used an elegant
hack_to have the file document itself and_its_usage. S/He wrote about the
latter. No,_I_am not impressed by the post_-_I_used a similar technique in
2003_or 2004 to bootstrap the documentation_of a very complex build system -
and I'm sure_others have before_and after me. But I_like_the_concise article.

Debating whether make is "better" than "sh" is completely_off-topic here_- if
there was_a universal truth we'd not have seen tools like psh,_scsh and the
