Skip to content

Commit f114eec

Browse files
mrochMarshall Roch
authored andcommitted
rename make copy-flow-files to make bin/flow
Summary: old name didn't make sense, new name matches the file it generates. yes, the ocp version of these targets still exists, and also writes bin/flow, but I hope to consolidate to a single build system. also in this diff, I combine the `make bin/flow` and `make dist/flow.zip` calls in Circle, so that we don't recompile flow twice. Reviewed By: avikchaudhuri Differential Revision: D7523844 fbshipit-source-id: a38f2442cf3de635cb2e478930cb6a9d90d89bfd
1 parent 6b6b30d commit f114eec

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ jobs:
7272
- save_cache: *save_opam_cache
7373
- run:
7474
name: Build flow
75-
command: opam config exec -- make
75+
command: |
76+
opam config exec -- make bin/flow dist/flow.zip
77+
mkdir -p bin/linux && cp bin/flow bin/linux/flow
7678
- run:
7779
name: Build libflowparser
7880
command: opam config exec -- make -C src/parser dist/libflowparser.zip
@@ -85,8 +87,6 @@ jobs:
8587
- run:
8688
name: Create artifacts
8789
command: |
88-
mkdir -p bin/linux && cp bin/flow bin/linux/flow
89-
opam config exec -- make dist/flow.zip
9090
cp dist/flow.zip dist/flow-linux64.zip
9191
cp src/parser/dist/libflowparser.zip dist/libflowparser-linux64.zip
9292
cp src/parser/flow_parser.js dist/flow_parser.js
@@ -146,15 +146,15 @@ jobs:
146146
- save_cache: *save_opam_cache
147147
- run:
148148
name: Build flow
149-
command: opam config exec -- make
149+
command: |
150+
opam config exec -- make bin/flow dist/flow.zip
151+
mkdir -p bin/macos && cp bin/flow bin/macos/flow
150152
- run:
151153
name: Build libflowparser
152154
command: opam config exec -- make -C src/parser dist/libflowparser.zip
153155
- run:
154156
name: Create artifacts
155157
command: |
156-
mkdir -p bin/macos && cp bin/flow bin/macos/flow
157-
opam config exec -- make dist/flow.zip
158158
cp dist/flow.zip dist/flow-osx.zip
159159
cp src/parser/dist/libflowparser.zip dist/libflowparser-osx.zip
160160
- persist_to_workspace:

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ LINKER_FLAGS=$(BYTECODE_LINKER_FLAGS)
194194

195195
RELEASE_TAGS=$(if $(FLOW_RELEASE),-tag warn_a,)
196196

197-
all: build-flow copy-flow-files
197+
all: bin/flow$(EXE)
198198
all-ocp: build-flow-with-ocp copy-flow-files-ocp
199199

200200
all-homebrew:
@@ -305,9 +305,9 @@ _build/scripts/ppx_gen_flowlibs.native: scripts/ppx_gen_flowlibs.ml
305305
scripts/ppx_gen_flowlibs.native
306306
rm -f ppx_gen_flowlibs.native
307307

308-
copy-flow-files: build-flow
309-
mkdir -p bin
310-
cp _build/src/flow.native bin/flow$(EXE)
308+
bin/flow$(EXE): build-flow
309+
mkdir -p $(@D)
310+
cp _build/src/flow.native $@
311311

312312
copy-flow-files-ocp: build-flow-with-ocp
313313
mkdir -p bin
@@ -322,10 +322,10 @@ do-test:
322322
do-test-tool:
323323
FLOW_BIN=../../bin/flow$(EXE) ${MAKE} -C packages/flow-dev-tools test
324324

325-
test-tool: build-flow copy-flow-files
325+
test-tool: bin/flow$(EXE)
326326
${MAKE} do-test-tool
327327

328-
test: build-flow copy-flow-files
328+
test: bin/flow$(EXE)
329329
${MAKE} do-test
330330

331331
test-ocp: build-flow-with-ocp copy-flow-files-ocp

0 commit comments

Comments
 (0)