Skip to content

Instantly share code, notes, and snippets.

@lirenlin
Created March 8, 2013 16:21
Show Gist options
  • Save lirenlin/5117649 to your computer and use it in GitHub Desktop.
Save lirenlin/5117649 to your computer and use it in GitHub Desktop.
Recursive Makefile Example
SUBDIRS = foo bar baz
subdirs:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir; \
done
SUBDIRS = foo bar baz
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
#http://lackof.org/taggart/hacking/make-example/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment