From 3f66b08b9c15a42eae50e1420b69350f7268165a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 7 Dec 2023 00:24:52 +0100 Subject: [PATCH] Simplify Makefile --- .github/workflows/ci.yml | 14 +++----------- Makefile | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad58e5..8d2685c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -365,27 +365,19 @@ jobs: - uses: actions/checkout@v3 - name: build - - # Plain `make` fails here with this error: - # No rule to make target '/cygdrive/d/a/quickjs-ng/quickjs-ng/cutils.c', - # needed by 'CMakeFiles/qjs.dir/cutils.c.o'. Stop. - # - # For some reason, making the build directory then `make`ing in there - # fixes it. run: | cd $GITHUB_WORKSPACE - make build/CMakeCache.txt - make --directory build + make - name: stats run: | cd $GITHUB_WORKSPACE - make --debug stats + make stats - name: test run: | cd $GITHUB_WORKSPACE - make --debug test + make test openbsd: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 92192e5..d2d2354 100644 --- a/Makefile +++ b/Makefile @@ -32,15 +32,15 @@ QJS=$(BUILD_DIR)/qjs RUN262=$(BUILD_DIR)/run-test262 -all: build +all: $(QJS) -build: $(BUILD_DIR)/CMakeCache.txt - cmake --build $(BUILD_DIR) -j $(JOBS) - -$(BUILD_DIR)/CMakeCache.txt: +$(BUILD_DIR): cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -install: build +$(QJS): $(BUILD_DIR) + cmake --build $(BUILD_DIR) -j $(JOBS) + +install: $(QJS) cmake --build $(BUILD_DIR) --target install clean: @@ -52,10 +52,10 @@ debug: distclean: @rm -rf $(BUILD_DIR) -stats: build +stats: $(QJS) $(QJS) -qd -test: build +test: $(QJS) $(QJS) tests/test_bigint.js $(QJS) tests/test_closure.js $(QJS) tests/test_language.js @@ -65,19 +65,19 @@ test: build $(QJS) tests/test_worker.js $(QJS) tests/test_queue_microtask.js -test262: build +test262: $(QJS) $(RUN262) -m -c test262.conf -a -test262-update: build +test262-update: $(QJS) $(RUN262) -u -c test262.conf -a -test262-check: build +test262-check: $(QJS) $(RUN262) -m -c test262.conf -E -a -microbench: build +microbench: $(QJS) $(QJS) tests/microbench.js -unicode_gen: $(BUILD_DIR)/CMakeCache.txt +unicode_gen: $(BUILD_DIR) cmake --build $(BUILD_DIR) --target unicode_gen libunicode-table.h: unicode_gen