Skip to content

Commit

Permalink
update package when other sources change in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Sep 14, 2016
1 parent 7e40b39 commit a8b31c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ build_dir=$(project_dir)/build
appstore_dir=$(build_dir)/appstore
package_name=$(app_name)

sources=$(wildcard js/*) $(wildcard js/*/*)
jssources=$(wildcard js/*) $(wildcard js/*/*)
othersources=$(wildcard appinfo/*) $(wildcard css/*/*) $(wildcard controller/*/*) $(wildcard templates/*/*) $(wildcard log/*/*)

all: build/main.js

Expand All @@ -17,13 +18,13 @@ clean:
node_modules: package.json
npm install --deps

build/main.js: node_modules $(sources)
build/main.js: node_modules $(jssources)
npm run build

appstore: clean build/main.js package

package: build/appstore/$(package_name).tar.gz
build/appstore/$(package_name).tar.gz: build/main.js
build/appstore/$(package_name).tar.gz: build/main.js $(othersources)
mkdir -p $(appstore_dir)
tar --exclude-vcs \
--exclude=$(appstore_dir) \
Expand Down

0 comments on commit a8b31c5

Please sign in to comment.