Fix makefile
This commit is contained in:
parent
cca1ca3986
commit
05463e53b8
16
Makefile
16
Makefile
@ -5,7 +5,8 @@ MAKEFLAGS += --warn-undefined-variables
|
|||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
# Executables used in this makefile
|
# Executables used in this makefile
|
||||||
PULP := pulp
|
PULP := pulp --psc-package
|
||||||
|
PSCPACKAGE := psc-package
|
||||||
NODE := node
|
NODE := node
|
||||||
YARN := yarn
|
YARN := yarn
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ EXAMPLEPATH := $(EXAMPLESPATH)/$(EXAMPLE)
|
|||||||
# Various output directories
|
# Various output directories
|
||||||
OUTPUT := ./out
|
OUTPUT := ./out
|
||||||
MODULES := ./node_modules
|
MODULES := ./node_modules
|
||||||
|
PSCPACKAGES := ./.psc-package
|
||||||
BUILD := $(OUTPUT)/build
|
BUILD := $(OUTPUT)/build
|
||||||
OUTPUT_DOCS := $(OUTPUT)/docs
|
OUTPUT_DOCS := $(OUTPUT)/docs
|
||||||
OUTPUT_EXAMPLE := $(OUTPUT)/examples/$(EXAMPLE)
|
OUTPUT_EXAMPLE := $(OUTPUT)/examples/$(EXAMPLE)
|
||||||
@ -42,8 +44,12 @@ EXAMPLESOURCES := $(EXAMPLESPATH)/**/*
|
|||||||
$(MODULES): $(PACKAGEJSON)
|
$(MODULES): $(PACKAGEJSON)
|
||||||
$(YARN) --cache-folder $(MODULES) install
|
$(YARN) --cache-folder $(MODULES) install
|
||||||
|
|
||||||
|
# Install psc packages
|
||||||
|
$(PSCPACKAGES): $(PSCPACKAGEJSON)
|
||||||
|
$(PSCPACKAGE) install
|
||||||
|
|
||||||
# Build the source files
|
# Build the source files
|
||||||
$(BUILD): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
$(BUILD): $(PSCPACKAGES) $(SOURCES) $(MODULES)
|
||||||
$(PULP) build \
|
$(PULP) build \
|
||||||
--src-path $(SRCPATH) \
|
--src-path $(SRCPATH) \
|
||||||
--build-path $(BUILD) \
|
--build-path $(BUILD) \
|
||||||
@ -91,7 +97,7 @@ test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
|||||||
$(BUILD_OPTIONS)
|
$(BUILD_OPTIONS)
|
||||||
|
|
||||||
# Launch a repl with all modules loaded
|
# Launch a repl with all modules loaded
|
||||||
repl: $(PSCPACKAGEJSON) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
repl: $(PSCPACKAGES) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
||||||
$(PULP) repl \
|
$(PULP) repl \
|
||||||
--include $(EXAMPLESPATH) \
|
--include $(EXAMPLESPATH) \
|
||||||
--src-path $(SRCPATH) \
|
--src-path $(SRCPATH) \
|
||||||
@ -99,7 +105,7 @@ repl: $(PSCPACKAGEJSON) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
|||||||
|
|
||||||
# Remove all make output from the source tree
|
# Remove all make output from the source tree
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUTPUT) $(MODULES)
|
rm -rf $(OUTPUT) $(MODULES) $(PSCPACKAGES)
|
||||||
|
|
||||||
# Print out a description of all the supported tasks
|
# Print out a description of all the supported tasks
|
||||||
help:
|
help:
|
||||||
@ -115,7 +121,7 @@ help:
|
|||||||
$(info - make help Print this help)
|
$(info - make help Print this help)
|
||||||
|
|
||||||
# Build the documentation
|
# Build the documentation
|
||||||
$(OUTPUT_DOCS): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
$(OUTPUT_DOCS): $(PSCPACKAGES) $(SOURCES) $(MODULES)
|
||||||
$(PULP) docs \
|
$(PULP) docs \
|
||||||
--src-path $(SRCPATH)
|
--src-path $(SRCPATH)
|
||||||
rm -rf $(OUTPUT_DOCS)
|
rm -rf $(OUTPUT_DOCS)
|
||||||
|
Loading…
Reference in New Issue
Block a user