summaryrefslogtreecommitdiff
path: root/gnulib-tool.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-31 21:08:55 +0200
committerBruno Haible <bruno@clisp.org>2022-07-31 23:52:50 +0200
commite3d8f648354446ba56b4fb95eef9f3841b669806 (patch)
treedb181e8bfcc75bf328914cfa3936d35b497e8621 /gnulib-tool.py
parent9d5acb8d7ebb11ad90861bbae95dff01ad156085 (diff)
downloadgnulib-e3d8f648354446ba56b4fb95eef9f3841b669806.tar.gz
gnulib-tool.py: Implement options --symlink and --local-symlink.
* gnulib-tool.py (main): Handle options --symlink and --local-symlink. * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from os.remove call.
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-xgnulib-tool.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py
index f20d1157a3..f936a92031 100755
--- a/gnulib-tool.py
+++ b/gnulib-tool.py
@@ -337,6 +337,16 @@ def main():
dest="makefile",
default=None,
type=str)
+ # symlink
+ parser.add_argument('-s', '--symbolic', '--symlink',
+ dest='symlink',
+ default=None,
+ action='store_true')
+ # local-symlink
+ parser.add_argument('--local-symlink',
+ dest='lsymlink',
+ default=None,
+ action='store_true')
# All other arguments are collected.
parser.add_argument("non_option_arguments",
nargs='*')
@@ -543,6 +553,8 @@ def main():
avoids = [ module
for list1 in avoids
for module in list1 ]
+ symlink = cmdargs.symlink == True
+ lsymlink = cmdargs.lsymlink == True
# Create pygnulib configuration.
config = classes.GLConfig(
@@ -566,6 +578,8 @@ def main():
podomain=podomain,
witness_c_macro=witness_c_macro,
vc_files=vc_files,
+ symbolic=symlink,
+ lsymbolic=lsymlink,
modcache=modcache,
verbose=verbose,
dryrun=dryrun,