Skip to content

Commit 3f66b08

Browse files
committed
Simplify Makefile
1 parent e7e938f commit 3f66b08

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

.github/workflows/ci.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -365,27 +365,19 @@ jobs:
365365
- uses: actions/checkout@v3
366366

367367
- name: build
368-
369-
# Plain `make` fails here with this error:
370-
# No rule to make target '/cygdrive/d/a/quickjs-ng/quickjs-ng/cutils.c',
371-
# needed by 'CMakeFiles/qjs.dir/cutils.c.o'. Stop.
372-
#
373-
# For some reason, making the build directory then `make`ing in there
374-
# fixes it.
375368
run: |
376369
cd $GITHUB_WORKSPACE
377-
make build/CMakeCache.txt
378-
make --directory build
370+
make
379371
380372
- name: stats
381373
run: |
382374
cd $GITHUB_WORKSPACE
383-
make --debug stats
375+
make stats
384376
385377
- name: test
386378
run: |
387379
cd $GITHUB_WORKSPACE
388-
make --debug test
380+
make test
389381
390382
openbsd:
391383
runs-on: ubuntu-latest

Makefile

+13-13
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ QJS=$(BUILD_DIR)/qjs
3232
RUN262=$(BUILD_DIR)/run-test262
3333

3434

35-
all: build
35+
all: $(QJS)
3636

37-
build: $(BUILD_DIR)/CMakeCache.txt
38-
cmake --build $(BUILD_DIR) -j $(JOBS)
39-
40-
$(BUILD_DIR)/CMakeCache.txt:
37+
$(BUILD_DIR):
4138
cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
4239

43-
install: build
40+
$(QJS): $(BUILD_DIR)
41+
cmake --build $(BUILD_DIR) -j $(JOBS)
42+
43+
install: $(QJS)
4444
cmake --build $(BUILD_DIR) --target install
4545

4646
clean:
@@ -52,10 +52,10 @@ debug:
5252
distclean:
5353
@rm -rf $(BUILD_DIR)
5454

55-
stats: build
55+
stats: $(QJS)
5656
$(QJS) -qd
5757

58-
test: build
58+
test: $(QJS)
5959
$(QJS) tests/test_bigint.js
6060
$(QJS) tests/test_closure.js
6161
$(QJS) tests/test_language.js
@@ -65,19 +65,19 @@ test: build
6565
$(QJS) tests/test_worker.js
6666
$(QJS) tests/test_queue_microtask.js
6767

68-
test262: build
68+
test262: $(QJS)
6969
$(RUN262) -m -c test262.conf -a
7070

71-
test262-update: build
71+
test262-update: $(QJS)
7272
$(RUN262) -u -c test262.conf -a
7373

74-
test262-check: build
74+
test262-check: $(QJS)
7575
$(RUN262) -m -c test262.conf -E -a
7676

77-
microbench: build
77+
microbench: $(QJS)
7878
$(QJS) tests/microbench.js
7979

80-
unicode_gen: $(BUILD_DIR)/CMakeCache.txt
80+
unicode_gen: $(BUILD_DIR)
8181
cmake --build $(BUILD_DIR) --target unicode_gen
8282

8383
libunicode-table.h: unicode_gen

0 commit comments

Comments
 (0)