Skip to content

Commit

Permalink
Improved .d files to make projects even more portable
Browse files Browse the repository at this point in the history
  • Loading branch information
srstrong committed Jan 23, 2015
1 parent 0c97863 commit 0ba95c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erl.mk
Expand Up @@ -134,7 +134,7 @@ ebin/%.app: src/%.app.src | ebin/
ebin/%.d: $$(wildcard src/%.erl) $$(wildcard src/*/%.erl) | ebin/
$(verbose) erlc -o ebin/ $(ERLCFLAGS) -Iinclude/ -I$(DEPS_DIR)/ -MP -MG -MF $@ $< > /dev/null
@gawk '/^[ \t]*-(behaviou?r\(|compile\({parse_transform,)/ {match($$0, /-(behaviou?r\([ \t]*([^) \t]+)|compile\({parse_transform,[ \t]*([^} \t]+))/, a); m = (a[2] a[3]); if (m != "" && ((system("ls src/" m ".erl 1>/dev/null 2>/dev/null") == 0) || (system("ls src/*/" m ".erl 1>/dev/null 2>/dev/null") == 0))) print "\nebin/$*.beam: ebin/" m ".beam"}' < $< >> $@
@sed -i.bak -e "s#$(DEPS_DIR)#\\$$\(DEPS_DIR\)#" $@
@sed -i.bak -e "s#$(PROJECT_DIR)#\\$$\(PROJECT_DIR\)#" $@
@rm $@.bak

ebin/%.beam: $$(wildcard src/%.erl) $$(wildcard src/*/%.erl) | ebin/
Expand Down

0 comments on commit 0ba95c0

Please sign in to comment.