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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -