File: Makefile

package info (click to toggle)
ruby-faye 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 1,792 kB
  • sloc: javascript: 14,833; ruby: 5,068; makefile: 30
file content (39 lines) | stat: -rw-r--r-- 872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
PATH  := node_modules/.bin:$(PATH)
SHELL := /bin/bash

source_files   := $(shell find src -name '*.js')
spec_files     := $(shell find spec -name '*_spec.js')
webpack_config := webpack.config.js

name           := faye-browser
bundles        := $(name).js $(name)-min.js

client_dir     := build/client
client_bundles := $(bundles:%=$(client_dir)/%)
top_files      := CHANGELOG.md LICENSE.md README.md package.json src
top_level      := $(top_files:%=build/%)

.PHONY: all gem clean

all: $(client_bundles) $(top_level)

gem: all
	gem build faye.gemspec

clean:
	rm -rf build *.gem spec/*_bundle.js{,.map}

$(client_dir)/$(name).js: $(webpack_config) $(source_files)
	webpack

$(client_dir)/$(name)-min.js: $(webpack_config) $(source_files)
	NODE_ENV=production webpack

build/src: $(source_files) build
	rsync -a src/ $@/

build/%: % build
	cp $< $@

build:
	mkdir -p $@