Skip to content

Instantly share code, notes, and snippets.

@infotroph
Last active September 9, 2017 02:52
Show Gist options
  • Select an option

  • Save infotroph/16726c36cedf9a3724ac568729a1c376 to your computer and use it in GitHub Desktop.

Select an option

Save infotroph/16726c36cedf9a3724ac568729a1c376 to your computer and use it in GitHub Desktop.
Guess the result!
# > ls -R ./dirs
# a b c d e
# ./dirs/a:
# file1 file2 file3
# ./dirs/b:
# fileOne fileThree fileTwo
# ./dirs/c:
# file 1 file 2 file 3
# ./dirs/d:
# file_1 file_2 file_3
# ./dirs/e:
# file-1 file-2 file-3
DIRS := a b c d e
DIRS := $(DIRS:%=.install/dirs/%)
.PHONY: install
install: $(DIRS) .install/dirs/all
.install/base/all: $(DIRS)
.SECONDEXPANSION:
.install/%: $$(wildcard %/**/*) $$(wildcard %/*)
# Actual build commands happen here, but not needed for the demo
mkdir -p $(@D)
echo `date` > $@
@infotroph
Copy link
Author

Seriously though, fuck make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment