diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-09-23 07:34:45 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-09-23 07:34:45 (GMT) |
commit | df6f8926c2c7b3c21d87ddfefd9ecd7f1d25ddd3 (patch) | |
tree | 8a0cf29ff425daedaef2a7f2a5e5b34688c68249 /Makefile | |
parent | a228c0488f42fd4e2e485654ff52e13d3f8e7a55 (diff) | |
download | mxe-df6f8926c2c7b3c21d87ddfefd9ecd7f1d25ddd3.zip mxe-df6f8926c2c7b3c21d87ddfefd9ecd7f1d25ddd3.tar.gz mxe-df6f8926c2c7b3c21d87ddfefd9ecd7f1d25ddd3.tar.bz2 |
Makefile: add cleanup-deps-style to reorder deps
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -567,6 +567,19 @@ endef cleanup-style: $(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile index.html CNAME src/*.mk src/*test.* tools/*)),$(call CLEANUP_STYLE,$(FILE))) +.PHONY: cleanup-deps-style +cleanup-deps-style: + @grep '(PKG)_DEPS.*\\' '$(TOP_DIR)'/src/*.mk > $(TOP_DIR)/tmp-$@-pre + @$(foreach PKG,$(PKGS), \ + $(if $(call lne,$(sort $(filter-out gcc,$($(PKG)_DEPS))),$(filter-out gcc,$($(PKG)_DEPS))), \ + $(info [cleanup] $(PKG)) \ + $(SED) -i 's/^\([^ ]*_DEPS *:=\).*/\1 '"$(strip $(filter gcc,$($(PKG)_DEPS)) $(sort $(filter-out gcc,$($(PKG)_DEPS))))"'/' '$(TOP_DIR)/src/$(PKG).mk'; \ + )) + @grep '(PKG)_DEPS.*\\' '$(TOP_DIR)'/src/*.mk > $(TOP_DIR)/tmp-$@-post + @diff -u $(TOP_DIR)/tmp-$@-pre $(TOP_DIR)/tmp-$@-post >/dev/null \ + || echo '*** Multi-line deps are mangled ***' && comm -3 tmp-$@-pre tmp-$@-post + @rm -f $(TOP_DIR)/tmp-$@-* + build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk) @echo '<!DOCTYPE html>' > $@ @echo '<html>' >> $@ |