Skip to content

Instantly share code, notes, and snippets.

@mrosset
Forked from davecheney/Makefile
Created March 4, 2011 10:42
Show Gist options
  • Save mrosset/854447 to your computer and use it in GitHub Desktop.
Save mrosset/854447 to your computer and use it in GitHub Desktop.
include $(GOROOT)/src/Make.inc
CMDS=\
command-1\
command-2\
command-3
PKGS=\
package-1\
package-2\
package-3
all: make
make: $(patsubst %, %.install, $(PKGS)) $(patsubst %, %.make, $(CMDS))
clean: $(patsubst %, %.nuke, $(PKGS)) $(patsubst %, %.clean, $(CMDS))
%.install:
$(MAKE) -C $* install
package-2.install: package-1.install
package-1.install package-2.install: package-3.install
%.make: %.install
$(MAKE) -C $*
%.clean:
$(MAKE) -C $* clean
%.nuke:
$(MAKE) -C $* nuke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment