From 8249c305f49847323963be724e864ff56f253190 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 23 Aug 2018 05:31:24 +0200 Subject: [PATCH] Add a Makefile check that SRC, DOC, and BIN cover everything. Run this with "make check-dirs". This is added to all CI builds. --- .circleci/config.yml | 6 +++--- .travis.yml | 2 +- Makefile | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a43626b..7f5e2349 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - run: sh -ex build/dependencies.sh install_linux - run: name: build - command: "make EMULATOR=$EMULATOR" + command: "make check-dirs all EMULATOR=$EMULATOR" no_output_timeout: 30m timeout: 120m - store_artifacts: @@ -25,7 +25,7 @@ jobs: - run: sh -ex build/dependencies.sh install_linux - run: name: build - command: "make EMULATOR=$EMULATOR" + command: "make check-dirs all EMULATOR=$EMULATOR" no_output_timeout: 30m timeout: 120m - store_artifacts: @@ -40,7 +40,7 @@ jobs: - run: sh -ex build/dependencies.sh install_linux - run: name: build - command: "make EMULATOR=$EMULATOR" + command: "make check-dirs all EMULATOR=$EMULATOR" no_output_timeout: 30m timeout: 120m - store_artifacts: diff --git a/.travis.yml b/.travis.yml index c8942e2a..00a3420c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: - EMULATOR=klh10 BASICS=yes - EMULATOR=sims BASICS=yes install: sh -ex build/dependencies.sh install_${TRAVIS_OS_NAME:-linux} -script: make +script: make check-dirs all deploy: provider: s3 access_key_id: "$AWS_ID" diff --git a/Makefile b/Makefile index 0a245032..ee1f1014 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,11 @@ BIN = sys2 emacs _teco_ lisp liblsp alan inquir sail comlap c decsys moon \ graphs draw datdrw fonts fonts1 fonts2 games macsym maint imlac \ _www_ hqm +# These are not included on the tape. +DOCIGNORE=-e '\.(jpeg|pdf|info|md)$$' -e '^(dcg|github)$$' +# These are on the minsys tape. +BINIGNORE=-e '^(ka10|ks10|sys)$$' + SUBMODULES = dasm itstar klh10 mldev simh sims supdup tapeutils # These files are used to create bootable tape images. @@ -52,6 +57,8 @@ OUT=out/$(EMULATOR) all: $(SMF) $(OUT)/stamp tools/supdup/supdup +check: all check-dirs + out/klh10/stamp out/simh/stamp: $(OUT)/rp0.dsk $(TOUCH) $@ @@ -168,5 +175,18 @@ tools/supdup/supdup: $(SMF): $(GIT) submodule update --init `dirname $@` +check-dirs: Makefile + mkdir -p $(OUT)/check + echo $(SRC) | tr ' ' '\n' | sort > $(OUT)/check/src1 + cd src; ls -1 > ../$(OUT)/check/src2 + diff -u $(OUT)/check/src1 $(OUT)/check/src2 > $(OUT)/check/src.diff + echo $(DOC) | tr ' ' '\n' | sort > $(OUT)/check/doc1 + cd doc; ls -1d */ | tr -d / | sort | \ + egrep -v $(DOCIGNORE) > ../$(OUT)/check/doc2 + diff -u $(OUT)/check/doc1 $(OUT)/check/doc2 > $(OUT)/check/doc.diff + echo $(BIN) | tr ' ' '\n' | sort > $(OUT)/check/bin1 + cd bin; ls -1 | egrep -v $(BINIGNORE) > ../$(OUT)/check/bin2 + diff -u $(OUT)/check/bin1 $(OUT)/check/bin2 > $(OUT)/check/bin.diff + clean: $(RM) -rf out start build/*/stamp