Skip to content

Commit

Permalink
FEAT: does not CLEAN on each build command (for faster re-compilation)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Nov 16, 2017
1 parent 0e88843 commit e5638c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions make/make.r3
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ attempt [do %make-settings.r]
cmd-menu: {^/^[[1;33;49mPlease choose version to build:^[[0m^/}

cmd-actions: [
"c" [val: none eval-cmd [{make TOOLS=} TOOLS { clean}]]
"q" [quit]
"" [val: none]
]
Expand Down Expand Up @@ -72,6 +73,7 @@ foreach [name data] settings [
]
i: i + 1
]
append cmd-menu {^-^[[1;32;49mc^[[0m: Clean^/}
append cmd-menu {^-^[[1;32;49mq^[[0m: Quit^/}

eval-cmd: func[cmd [string! block!] /local err][
Expand All @@ -89,8 +91,10 @@ move-file: func[file [file!] dir [file!]][
]

menu?: true
prev: none
forever [
if menu? [print cmd-menu]

error? try [val: trim/head/tail ask "^[[1;32;49mBuild version: ^[[0m"]
switch/default val cmd-actions [
print "What?"
Expand All @@ -99,6 +103,11 @@ forever [

if val [
eval-cmd [rebol-tool " -qs ../src/tools/make-make.r " OS_ID]
if prev <> val [
;clean if making different target or for the first run
eval-cmd [{make TOOLS=} TOOLS { clean}]
prev: val
]
eval-cmd [{make TOOLS=} TOOLS { all}]
make-dir/deep BUILD_DIR

Expand Down
6 changes: 3 additions & 3 deletions src/tools/make-make.r
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ make:
$(REBOL) $T/make-make.r $(OS_ID)
clean:
$(RM) libr3$(LIB_SUFFIX) objs $(RES)
$(RM) $(RES)
$(RM) objs
all:
$(MAKE) clean
$(MAKE) prep
$(MAKE) r3$(BIN_SUFFIX)
$(MAKE) lib
Expand Down Expand Up @@ -411,7 +411,7 @@ unless flag? -SP [ ; Use standard paths:
either flag? EXE [
macro+ BIN_SUFFIX %.exe
macro+ LIB_SUFFIX %.dll
macro+ RES {"objs/r3.res"}
macro+ RES {"objs\r3.res"}
macro+ RM "DEL /s /q"
][
macro+ LIB_SUFFIX %.so
Expand Down

0 comments on commit e5638c0

Please sign in to comment.