git - Makefile for pulling and building projects -


i building project requires ecosystem of projects (linux, qemu, uboot etc) of in git repositories. used manage them script find myself implementing stuff better done make. decided migrate script makefile.

the problem want projects cloned if not present , pulled if present. there way without repeaing myself much?

something work think. doesn't have make work because without depending on inside project directories i'm not sure conditionally run clone.

force: ;  proj%: force     @echo [ -d $@ ] || git clone srv:$@     @cd $@ && git pull 

if wanted list proj1/.git/config entry-point prereq split clone order-only prereq on clone project directory. though still need force on config prereq force pull happen.

something perhaps:

proj%:     git clone srv:$@  proj%/.git/config: force | proj%     git pull 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -