Skip to content

Commit b518f11

Browse files
committed
dont build js if not needed in makefile
1 parent aaa14d1 commit b518f11

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ build_dir=$(project_dir)/build
66
appstore_dir=$(build_dir)/appstore
77
package_name=$(app_name)
88

9-
all: javascript
9+
sources=$(wildcard js/*) $(wildcard js/*/*)
10+
11+
all: build/main.js
1012

1113
clean:
1214
rm -rf $(build_dir)
@@ -15,12 +17,13 @@ clean:
1517
node_modules: package.json
1618
npm install --deps
1719

18-
javascript: node_modules
20+
build/main.js: node_modules $(sources)
1921
npm run build
2022

21-
appstore: clean javascript package
23+
appstore: clean build/main.js package
2224

23-
package:
25+
package: build/appstore/$(package_name).tar.gz
26+
build/appstore/$(package_name).tar.gz: build/main.js
2427
mkdir -p $(appstore_dir)
2528
tar --exclude-vcs \
2629
--exclude=$(appstore_dir) \

0 commit comments

Comments
 (0)