Permalink
Browse files

[enhance] windows,Makefile: cache for packages and plugins enumeratio…

…n (was too long)
  • Loading branch information...
1 parent 68e541f commit 5e5b3338bfe82c6dd4afcd6a670b098364634672 Rudy Sicard committed with OpaOnWindowsNow Oct 31, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 Makefile
View
@@ -134,8 +134,12 @@ endef
# List all packages and plugins in stdlib
-OPA_PACKAGES := $(shell $(OPALANG_DIR)/lib/stdlib/all_packages.sh $(OPALANG_DIR)/lib/stdlib/node.exclude $(OPALANG_DIR)/lib/stdlib)
-OPA_PLUGINS := $(shell $(OPALANG_DIR)/lib/stdlib/all_plugins.sh $(PWD)/$(OPALANG_DIR)/lib/stdlib && echo "opabsl")
+# caches are needed because too slow on cygwin/msys
+OPA_PACKAGES_CACHE = _build/OPA_PACKAGES.cache
+OPA_PLUGINS_CACHE = _build/OPA_PLUGINS.cache
+OPA_PACKAGES := $(shell if [ ! -f $(OPA_PACKAGES_CACHE) ]; then $(OPALANG_DIR)/lib/stdlib/all_packages.sh $(OPALANG_DIR)/lib/stdlib/node.exclude $(OPALANG_DIR)/lib/stdlib > $(OPA_PACKAGES_CACHE); fi; cat $(OPA_PACKAGES_CACHE))
+OPA_PLUGINS := $(shell if [ ! -f $(OPA_PLUGINS_CACHE) ]; then $(OPALANG_DIR)/lib/stdlib/all_plugins.sh $(OPALANG_DIR)/lib/stdlib > $(OPA_PLUGINS_CACHE); fi; cat $(OPA_PLUGINS_CACHE) && echo opabsl)
+
# Rules installing everything that has been compiled
#

0 comments on commit 5e5b333

Please sign in to comment.