You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add initial support for the 'tup variant' command on Windows.
On other OSes, the 'tup variant' command creates a symlink to the config
files, but since that doesn't work easily on Windows we just copy the
file instead. We have to calculate a slightly different path to make
that work, and adjust the test cases to account for the fact that the
variant won't be updated when the source config file is modified.
Copy file name to clipboardExpand all lines: src/tup/tup/main.c
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ static struct help {
65
65
{"refactor", "ref", "", "The refactor command can be used to help refactor Tupfiles. This will cause tup to run through the parsing phase, but not execute any commands. If any Tupfiles that are parsed result in changes to the database, these are reported as errors."},
66
66
{"monitor", NULL, "", "*LINUX ONLY* Starts the inotify-based file monitor. The monitor must scan the filesystem once and initialize watches on each directory. Then when you make changes to the files, the monitor will see them and write them directly into the database. With the monitor running, 'tup' does not need to do the initial scan, and can start constructing the build graph immediately."},
67
67
{"stop", NULL, "", "Kills the monitor if it is running."},
68
-
{"variant", NULL, "foo.config [bar.config] [...]", "For each argument, this command creates a variant directory with tup.config symlinked to the specified config file."},
68
+
{"variant", NULL, "foo.config [bar.config] [...]", "For each argument, this command creates a variant directory with tup.config symlinked (Windows: copied) to the specified config file."},
69
69
{"dbconfig", NULL, "", "Displays the current tup database configuration. These are internal values used by tup."},
70
70
{"options", NULL, "", "Displays all of the current tup options, as well as where they originated."},
71
71
{"graph", NULL, "[--dirs] [--ghosts] [--env] [--combine] [--stickies] [<output_1> ... <output_n>]", "Prints out a graphviz .dot format graph of the tup database to stdout. By default it only displays the parts of the graph that have changes. If you provide additional arguments, they are assumed to be files that you want to graph."},
@@ -847,11 +847,23 @@ static int create_variant(const char *config_path)
847
847
fprintf(stderr, "tup error: linkdest is too small to fit the tup.config symlink destination.\n");
0 commit comments