summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 19bc883d60e57500507bc8e9b9e436d14b322cb8 (plain)
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
CLI uses itself for command line options parsing which makes it a bit tricky
to develop. Below is one way to setup the development environment:

$ git clone .../cli.git
$ cd cli
$ bdep init -C ../builds/main @main cc          # Main build.
$ bdep update                                   # Using pre-geneared code.
$ bdep init -d cli/ -C ../builds/save @save cc  # "Saved" build.
$ bdep update @save

# @@ This does not currently work because bdep (bpkg) will drop it on next
#    sync (reconfigure).
#
#$ b configure: ../builds/main/cli/ \
#  config.cli="$(realpath ../builds/save/cli/cli/cli)"

$ echo >>../builds/main/build/config.build \
  "cli/ config.cli=$(realpath ../builds/save/cli/cli/cli)"

$ bdep update                                   # Regenerate code.

Then, when making changes that affect the generated code, perform the
following sequence of steps (the key thing to keep in mind is that the saved
configuration will use generated code from source directory that is
backlinked during the main build):

$ b cli/                                        # Regenerate using old saved.
$ bdep update @save                             # Update saved.
$ b cli/                                        # Regenerate using new saved.
$ bdep update @save                             # Update saved.