Permalink
Browse files

Clean up the dev build.

- build/dev.sh minimal is for running with osh/lex.py
- build/dev.sh all requires re2c.  It calls our custom codegen, now
  in build/codegen.sh ast-id-lex.

Also:

- Don't pollute the repo with 'out.txt' in spec tests.
  • Loading branch information...
Andy Chu
Andy Chu committed Dec 10, 2017
1 parent 20daec3 commit 4dcfb29d88be66636918a6ef67a3e90f9e1ce1df
Showing with 24 additions and 18 deletions.
  1. +6 −1 build/codegen.sh
  2. +14 −13 build/dev.sh
  3. +2 −2 scripts/release.sh
  4. +2 −2 spec/process-sub.test.sh
View
@@ -74,13 +74,18 @@ osh-lex-gen-native() {
-o _build/gen/osh-lex.h _build/gen/osh-lex.re2c.h
}
lexer() {
# Called by build/dev.sh for fastlex.so.
ast-id-lex() {
mkdir -p _build/gen
ast-gen
id-gen
osh-lex-gen
osh-lex-gen-native
}
lexer() {
ast-id-lex
# Why do we need this?
rm -f _devbuild/py-ext/x86_64/fastlex.so
View
@@ -27,7 +27,8 @@ ubuntu-deps() {
# These produce _devbuild/{osh,oil}_help.py
gen-help() {
build/doc.sh osh-quick-ref
build/doc.sh oil-quick-ref
# I believe this will be obsolete
#build/doc.sh oil-quick-ref
}
# TODO: should fastlex.c be part of the dev build? It means you need re2c
@@ -54,32 +55,32 @@ py-ext() {
pylibc() {
py-ext libc build/setup.py
PYTHONPATH=. native/libc_test.py
}
fastlex() {
py-ext fastlex build/setup_fastlex.py
PYTHONPATH=. native/fastlex_test.py
}
# Also done by unit.sh.
test-pylibc() {
export PYTHONPATH=.
pylibc
native/libc_test.py
}
clean() {
rm -f --verbose libc.so fastlex.so
rm -r -f --verbose _devbuild/py-ext
}
# TODO: We should put the fastlex.so extension here. But I don't want to
# require re2c installation just yet. Developers can use the slow lexer for
# now.
all() {
# No fastlex, because we don't want to require re2c installation.
minimal() {
gen-help
pylibc
test-pylibc
}
# Prerequisites: build/codegen.sh {download,install}-re2c
all() {
minimal
build/codegen.sh
build/codegen.sh ast-id-lex
fastlex
}
"$@"
View
@@ -72,8 +72,8 @@ log() {
# oheap/
# ...
# startup/
# download/
# 0.0.0/ # TODO: Add version here, so we can have binaries too?
# download/ # What about native binaries?
# 0.0.0/
# oil-0.0.0.tar.xz
remove-files() {
View
@@ -18,10 +18,10 @@ stdout_stderr() {
echo e3;
} >& 2
}
stdout_stderr 2> >(grep warning) | tac >out.txt
stdout_stderr 2> >(grep warning) | tac >$TMP/out.txt
wait $! # this does nothing in bash 4.3, but probably does in bash 4.4.
echo OUT
cat out.txt
cat $TMP/out.txt
# PROBLEM -- OUT comes first, and then 'warning: e2', and then 'o2 o1'. It
# looks like it's because nobody waits for the proc sub.
# http://lists.gnu.org/archive/html/help-bash/2017-06/msg00018.html

0 comments on commit 4dcfb29

Please sign in to comment.