From 304e0f3eb0fac012a3aac9ec02918f1e4616bde7 Mon Sep 17 00:00:00 2001 From: Tim King Date: Thu, 12 Nov 2015 04:23:08 -0800 Subject: [PATCH] Updating the contrib/new-theory script and travis to use the new Makefile.theories script. --- .travis.yml | 4 ++-- contrib/new-theory | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18204d3c6..f3d680374 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,9 +51,9 @@ script: } addNewTheoryTest() { contrib/new-theory test_newtheory || error "NEWTHEORY FAILED"; - grep -q '^THEORIES *=.* test_newtheory' src/Makefile.am || error "NEWTHEORY FAILED"; + grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED"; contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED"; - grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.am || error "NEWTHEORY-ALTERNATE FAILED"; + grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED"; } LFSCchecks() { cd proofs/lfsc_checker && diff --git a/contrib/new-theory b/contrib/new-theory index 1868fecec..8f9714372 100755 --- a/contrib/new-theory +++ b/contrib/new-theory @@ -133,17 +133,17 @@ else fi echo -echo "Adding $dir to THEORIES to src/Makefile.am..." -if grep -q '^THEORIES = .*[^a-zA-Z0-9_]'"$dir"'\([^a-zA-Z0-9_]\|$\)' src/Makefile.am &>/dev/null; then - echo "NOTE: src/Makefile.am already lists theory $dir" +echo "Adding $dir to THEORIES to src/Makefile.theories..." +if grep -q '^THEORIES = .*[^a-zA-Z0-9_]'"$dir"'\([^a-zA-Z0-9_]\|$\)' src/Makefile.theories &>/dev/null; then + echo "NOTE: src/Makefile.theories already lists theory $dir" else - awk '/^THEORIES = / {print $0,"'"$dir"'"} !/^THEORIES = / {print$0}' src/Makefile.am > src/Makefile.am.new-theory - if ! cp -f src/Makefile.am src/Makefile.am~; then - echo "ERROR: cannot copy src/Makefile.am !" >&2 + awk '/^THEORIES = / {print $0,"'"$dir"'"} !/^THEORIES = / {print$0}' src/Makefile.theories > src/Makefile.theories.new-theory + if ! cp -f src/Makefile.theories src/Makefile.theories~; then + echo "ERROR: cannot copy src/Makefile.theories !" >&2 exit 1 fi - if ! mv -f src/Makefile.am.new-theory src/Makefile.am; then - echo "ERROR: cannot replace src/Makefile.am !" >&2 + if ! mv -f src/Makefile.theories.new-theory src/Makefile.theories; then + echo "ERROR: cannot replace src/Makefile.theories !" >&2 exit 1 fi fi -- 2.30.2