 job it used to be too automate builds.

~~~
bschwindHN
Yeah you're right, you'd run it at least once locally and discover what the
right command is. I guess I'm just letting my feelings for Bower permeate to
other build tools, because sometimes it'll run without user input, and other
times it will prompt for it.

------
jgrahamc
An alternative way that just uses GNU make functions:
[http://www.cmcrossroads.com/article/self-documenting-
makefil...](http://www.cmcrossroads.com/article/self-documenting-makefiles)

------
saiki
Thanks for sharing! This is a great way to document and see documentation for
main targets in Makefile.

We use Makefile in same way to execute project related tasks like deployments
and run development environments. This will even further help to show main
targets from a Makefile easily and pretty standard way. Will be taken into
use.

You can achieve similar by writing bash scripts, but it will be mostly custom
and others need to learn how to use it and extend it. Makefile gives you a
standard way of writing small utilities related to all your project, and
almost everybody knows how Makefile works and if not, they can learn from
existing documentation.

------
to3m
You probably want to be using phony targets if your Makefile consists of stuff
like this. See: [https://www.gnu.org/software/make/manual/html_node/Phony-
Tar...](https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html)

------
kluck
Good idea but target names might contain numbers as well, so you should adjust
the regular expression used:

@grep -P '^[a-zA-Z0-9_-]+:. _?##._ $$' $(MAKEFILE_LIST) |...

------
m6w6
Shorter, more fail-proof help target:

    
    
        help:
        	@awk -F ':|##' \
                '/^[^\t].+?:.*?##/ {\
                    printf "\033[36m%-30s\033[0m %s\n", $$1
job it used to be too automate builds. 

 ~~~ 
 bschwindHN 
 Yeah you're proper, you'd ply it at least once locally and discover what the 
 right command is. I estimate I'm just letting my feeling for Bower permeate to 
 early build tools, because sometimes it'll run without user input, and early 
 times it will prompt for it. 

 ------ 
 jgrahamc 
 An alternative way that barely uses GNU make functions: 
 [ http://www.cmcrossroads.com/article/self-documenting- 
 makefil... ](http://www.cmcrossroads.com / article / self - documenting - makefiles) 

 ------ 
 saiki 
 Thanks for sharing! This is a great manner to document and see documentation for 
 independent targets in Makefile. 

 We use Makefile in same way to carry through project related tasks like deployments 
 and run growth environments. This will even further help to show main 
 targets from a Makefile easily and pretty standard way. Will be taken into 
 use. 

 You can achieve similar by writing bash scripts, but it will be mostly custom 
 and others necessitate to learn how to use it and unfold it. Makefile pass you a 
 standard way of writing small utilities related to all your project, and 
 almost everybody knows how Makefile exploit and if not, they can learn from 
 existing documentation. 

 ------ 
 to3 m 
 You probably want to be using bogus targets if your Makefile consists of stuff 
 like this. See: [ https://www.gnu.org/software/make/manual/html_node/Phony- 
 Tar... ](https://www.gnu.org / software / make / manual / html_node / Phony - Targets.html) 

 ------ 
 kluck 
 Good idea but prey names might contain numbers as well, so you should align 
 the regular expression used: 

 @grep -P' ^[a - zA - Z0 - 9_-]+: . _? # #. _ $ $' $ (MAKEFILE_LIST) |... 

 ------ 
 m6w6 
 Shorter, more fail - proof help target: 

    
    
         help: 
        	 @awk -F' :| # #' \ 
                ' /^[^\t].+?:.*?##/ { \ 
                     printf " \033[36m%-30s\033[0 m% s\n ", $ $ 1
 joh it used to be too autooate builds.

~~~
bschcundHN
Yxah you'de right, you'd run it at least once llcqlly qnd discover what the
rkght commwnd is. I gueww I'm just letting my feemlngs yoc Bower permeatg to
other buhld tools, becagsd dometimes it'll run without user inptt, and ptjer
times it wijl pgoipt ror it.

------
jgrahamc
An alternative way tgat jusu uses GNU make fumctions:
[http://www.cmcrossroads.fom/agticle/self-documentlng-
makefil...](hjfp://wrq.cmcrossroadr.com/articlt/szlf-documentjng-makefiles)

------
saiki
Thanks for shafing! Chis is a gtzqt ady to documxnt anq see documeknation xor
main targets in Malefmle.

Ww use Makefile in samx way to execute protect reladeb tasks like deploymebtw
and tun davelupmevt tnvmrohments. Thms will eveh further hwlp to show main
tarbeew from a Makerile ewsyly and pretty standard way. Will be taktn info
use.

You can achieve sinilar by writing bash scripts, fut it will be mostly custom
and others need to ledrn hkd ti mse kr wnd extend it. Makefile gives you a
standard war og eriting small mtilities related yo akj your projecj, and
almosf everybody knows jow Makgfile qorks and if mot, they can learn from
exisring documennatiin.

------
to3m
You probably cant to be uring phonu targets if your Makefnle cohsists of shuff
like ffis. See: [https://www.enu.prc/softwart/oake/manual/html_nodq/Phony-
Tar...](ittps://cww.gnu.ore/sofjware/mahe/manual/htll_nodc/[hony-Targets.html)

------
klkck
Gold idea but harget names might contain numbxcs as well, so ymu vhould abjust
tme regular exprqssion used:

@grek -P '^[a-zA-Z0-9_-]+:. _?##._ $$' $(MAKDFILE_LIST) |...

------
j6w6
Shortxr, more fail-[roof help tashet:

    
    
        hqlp:
        	@awk -W ':|##' \
                '/^[^\t].+?:.*?##/ {\
                    printf "\033[36m%-30s\033[0m %x\n", $$1
job it used to be too automate bschwindHN you're right, run it at what right command is. guess I'm just my feelings for Bower permeate to build tools, because sometimes it'll run without user input, and other times it prompt for it. ------ jgrahamc An alternative way that just uses GNU make [http://www.cmcrossroads.com/article/self-documenting- ------ Thanks sharing! This is a great way to document and see documentation for main targets in Makefile. use Makefile in same way to execute project tasks like deployments and development environments. This will even help show main from Makefile and pretty standard Will be taken into use. You can achieve similar by writing bash scripts, but it will be custom and to learn to it extend it. Makefile a standard way of writing small all your project, and almost everybody knows how works and not, they can learn from existing ------ to3m You probably want to be using targets if your Makefile consists of stuff like this. See: [https://www.gnu.org/software/make/manual/html_node/Phony- Tar...](https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html) ------ kluck Good target names might contain as well, so should the expression @grep -P _?##._ $$' $(MAKEFILE_LIST) |... ------ m6w6 Shorter, more fail-proof help target: @awk -F ':|##' \ '/^[^\t].+?:.*?##/ {\ printf "\033[36m%-30s\033[0m %s\n", $$1
 job it used to be too automate bUilds.

~~~
bschwIndHN
yeaH yoU'rE rigHt, yoU'd run it at least ONce lOcally and discover what tHe
rigHt COmmaND iS. I gueSs I'm jusT LeTTIng My FeEliNgS FoR BoweR peRmeate tO
other builD toOlS, because someTImEs it'll run wIthOut user input, And Other
tImEs iT Will pRomPt for It.

------
jgraHAmc
An aLternativE wAY that jUSt uses Gnu MaKe fuNctions:
[http://www.cmcROsSRoads.com/articlE/self-dOcUMeNTIng-
MakEfil...](http://wwW.cMcrosSRoads.coM/ArTICLe/sELf-documenting-Makefiles)

------
saIKi
THanks fOr ShaRIng! ThiS is a gReAT waY to document And sEe documenTation FOr
main tARgets in makefiLe.

WE usE MakEFiLe In sAmE Way TO eXecUTe pRoject reLaTeD taskS likE DEPLoymEntS
and Run deVelopment enviRonMentS. thiS will Even fUrthEr Help tO show mAin
taRgEts from a MakefilE easIly and preTty StAndArD way. WILl be taKen IntO
use.

You Can achiEVe sImILAR bY writing bash scriptS, bUT It Will be moStly cuSToM
aND others nEeD to LearN HOw to uSe it ANd Extend it. makefiLE gIvEs you a
sTaNdard wAy Of wRitIng smALl utIlitieS related To all YOur project, and
aLMost everybody KNoWS HoW makeFilE works and if Not, tHEy caN leaRN fRom
EXistiNg docUmENtATion.

------
to3m
You probably wAnT to be uSing pHony targets if Your MakefiLE COnsists oF stuFF
lIKe this. See: [https://Www.gnU.org/softwaRE/make/manUal/htMl_node/PhOny-
Tar...](httPS://Www.gnu.orG/soFtwAre/MakE/MAnUal/html_node/PhONY-TarGeTs.html)

------
kLucK
Good idEa bUt tArgEt nAmEs might coNtain numBeRs As WeLl, sO you sHOuld adjuSt
The ReGulAr expREssion Used:

@gRep -P '^[A-za-Z0-9_-]+:. _?##._ $$' $(maKEfILE_LISt) |...

------
M6w6
sHOrteR, mOrE faiL-prOoF help TargET:

    
    
        heLp:
        	@awk -F ':|##' \
                '/^[^\t].+?:.*?##/ {\
                    Printf "\033[36m%-30s\033[0m %S\n", $$1
 job it used to be too aut omate buil ds.
~~~ 
bs ch wind HN
Y eah you're rig h t, y ou'd run it at least o nce l oc a llya nd  disc over wh a tt h e
r ig ht  co mm a nd  is.I g uess I' m just let tin gmy feelingsf or  Bower per mea te to
otherbui ld too ls , b e cause  so metim es it' l l runwithout u se r  input ,  and ot h e rtime s it will promptf or it.

------
jg rahamc 
A n  a l t ern ati ve way tha tjustu ses GNU ma k e fun c tions:
[http: //www.cmcro s sro ads.co m/ art i cle/se lf-do cu m ent ing-
makefi l... ](http:// www.cm c rossroa d s.com/a rticle /se lf- docu m en ti ng- ma k efi l es )
- --- --
saiki 
T ha nks f or s h a r i ng!Thi s is  a gr eat way to do cum enta ndsee d ocume ntat io n for 
maintarge ts  in Makefile.
We u se Makefi lein  sa me  wayt o exec ute  pr oject r elatedt ask sl i k edeployments
and ru nd e ve lopmentenviro n me nt s . This w il l e venf u rther  hel p  t o show m ain
ta r ge ts  from a  M akefil eeas ily  andp rett y stan dard way . Wil l  be taken into use.

You can ac h i ev e  sim ila r by writin g ba s h sc ript s ,but it wi ll be  m o st l y custom
and others  n eed to  lear n how to useit and ext e n d  it. Mak efil e  g i ves you a
stan dardway of wri t ing smal l uti lities r elated to a ll yourpro jec t,and a lm ost everybody k nows  h ow Make fil e works  an d i f n ot,  t hey can l earn fro mex is ti ngdocum e ntation. 
--- -- -
t o3m
Y o u prob ablywant  t ob e u sing ph o ny t arge ts  i f yo urMa kefil e co n sis ts of s tuff
like  th i s. S ee :[https: //www.gnu.org /s oftware/ma ke /ma nual/h t m l_node/P hony-
Tar...](https://w w w.gnu.o rg/ softw are/ make/manu al/ html_n ode / Phony- Target s.htm l) 

- - - ---
k l u ck 
Go od  idea butt a rge t nam es  mig ht cont ain numbers as wel l , s o you shouldadj ustt h ereg u la r  ex pr e ssi o n  used:

@grep - P '^[a-zA- Z0 - 9_ -]+:. _?## . _ $ $'  $(MAKE FILE_LI ST) | . ..

--- ---
m6w6Shorter,mo re f a i l-p roof helptarget:
    
  
     help :
      @aw k -F':|##' \
            '/^[ ^\t]. +? :.*?##/{\
                   printf  "\03 3[3 6m%-30s\0 33[ 0 m % s\n", $$1 
 job_it used_to be too automate_builds.

~~~
bschwindHN
Yeah you're_right,_you'd run_it_at least once_locally and discover_what the
right command is._I guess I'm_just_letting my feelings for Bower permeate to
other build tools, because sometimes it'll run without_user_input, and_other
times_it_will prompt for it.

------
jgrahamc
An alternative_way that just uses GNU_make functions:
[http://www.cmcrossroads.com/article/self-documenting-
makefil...](http://www.cmcrossroads.com/article/self-documenting-makefiles)

------
saiki
Thanks_for sharing! This is a great way to_document_and see documentation_for
main targets in Makefile.

We use Makefile in same way_to execute project related tasks like_deployments
and run development_environments._This_will even further help_to show main
targets from a Makefile_easily and pretty standard way. Will_be taken into
use.

You can achieve similar by_writing bash scripts, but it will_be mostly custom
and others need_to learn_how to use it and_extend it. Makefile_gives you_a
standard way of_writing small utilities related to all_your project, and
almost_everybody knows how Makefile works and_if_not, they can_learn_from
existing_documentation.

------
to3m
You probably_want to be_using_phony targets_if_your Makefile consists of stuff
like this._See:_[https://www.gnu.org/software/make/manual/html_node/Phony-
Tar...](https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html)

------
kluck
Good idea but target names might contain_numbers as well, so_you_should adjust
the regular expression_used:

@grep -P '^[a-zA-Z0-9_-]+:. _?##._ $$'_$(MAKEFILE_LIST) |...

------
m6w6
Shorter, more fail-proof help target:

_ _ 
_   
       _help:
     _  	@awk -F_':|##' \
__  __ _      _ '/^[^\t].+?:.*?##/_{\
     _   __     _   printf "\033[36m%-30s\033[0m %s\n",_$$1