-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
31 lines (18 loc) · 1.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
To use:
1. Make a folder.
2. Put some .cpp files inside the-folder/src
3. touch the-folder/bin/appname.target
4. From that folder, invoke: redo-lab/bin/make-sandbox some-target-folder
5. cd some-target-folder
6. redo appname
7. Customize the build by adding a "foo.defines" file alongside your "foo.cpp" file. Put "BAR" inside it.
8. redo -x foo.o
9. Notice it compiled with -DBAR.
Note that step #4 is only necessary if the longest common prefix between your source folder and your target folder is a place you don't have permission to write to. If you're not making your sandbox a subdirectory there's a good chance this is the case. Redo is going to be modified in the future to only put its tracking files in folders that actually contain output files, so this hiccup should go away in the future.
I think in the future instead of .define files, you will be able to have target specific .do scripts that can invoke a bunch of different utilities. I imagine something like this for foo.o:
# Bring utilities into path
. ../import-scripts
add-define BAR
no-optimization
compile
add-define and no-optimization would be compiler-portable commands to adjust the compilation of that specific file, and the compile command would use the options specified by previously executed commands just within that .do script.