summaryrefslogtreecommitdiff
path: root/gnulib-tool.py
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* gnulib-tool.py: Finish implementing option --conditional-dependencies.Bruno Haible2022-08-101-2/+11
| | | | | | | | | | | | | | | | | | | | | * gnulib-tool.py (main) Accept options --conditional-dependencies, --no-conditional-dependencies. * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use str(module), not module, as key. Fix logic bug. (GLModuleTable.getCondition): Simplify. (GLModuleTable.transitive_closure): Show a warning when there are duplicate dependencies. Fix logic bug. (GLModuleTable.transitive_closure_separately): Simplify. (GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple lib_SOURCES augmentation lines. Cope with comments at the end of a lib_SOURCES augmentation line. Add the dummy module at the end of the modules list. * pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces the dummy module to the end of the list. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to terminate the shell functions. Add code for the dependencies from the unconditional to the conditional modules. Don't emit AM_CONDITIONAL for unconditional modules.
* gnulib-tool.py: Finish implementing option --extract-test-module.Bruno Haible2022-08-081-0/+8
| | | | * gnulib-tool.py (main): Accept option --extract-tests-module.
* gnulib-tool.py: Fix handling of nonexistent module names in --extract-*.Bruno Haible2022-08-081-69/+64
| | | | | * gnulib-tool.py (main): To test whether a module exists, just call GLModuleSystem.find and test its return value.
* gnulib-tool.py: Fix --extract-dependencies result.Bruno Haible2022-08-081-9/+1
| | | | | | | | | | | | * pygnulib/GLModuleSystem.py (GLModule.getDependencies): Return a snippet, not a list. Implement dependency of ${module}-tests on ${module}. (GLModule.getDependenciesWithoutConditions, GLModule.getDependenciesWithConditions): New methods. (GLModuleTable.transitive_closure): Call getDependenciesWithConditions. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Call getDependenciesWithoutConditions. * gnulib-tool.py (main) [--extract-dependencies]: Update.
* gnulib-tool.py: Fix section extraction from module descriptions.Bruno Haible2022-08-071-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code with self.content.split(section)[-1] was broken because it recognizes an indented section label. Similar code with ('\n' + self.content).split('\n' + section)[-1] would still be broken because it recognizes an indented section label in the first line of the file. The code with section_label_regex was broken because sometimes it returns the second-to-last section with the given label, not the last one. Also, whitespace after the colon was not ignored. * pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module description's contents immediately, once only, in a reliable way. (GLModule.getDescription, GLModule.getComment): Simplify. (GLModule.getStatus): Simplify. Return a string. (GLModule.getStatuses): New function. Return a list. (GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles, GLModule.getDependencies, GLModules.getAutoconfSnippet_Early, GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional, GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw): Simplify. (GLModule.getLicense): Remove whitespace after calling getLicense_Raw. (GLModule.getMaintainer): Simplify. (GLModuleTable.transitive_closure): Call getStatuses() instead of getStatus(). * pygnulib/GLEmiter.py: Likewise. * gnulib-tool.py (main): For --extract-description, --extract-comment, --extract-status, --extract-notice, --extract-autoconf-snippet, --extract-automake-snippet, --extract-include-directive, --extract-link-directive, --extract-maintainer, don't add an extra newline after the snippet.
* gnulib-tool.py: Implement option --find.Bruno Haible2022-08-071-1/+59
| | | | | | | | * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): New method. (GLModuleSystem.list): Filter the listing in memory; don't use a 'sed' subprocess. * gnulib-tool.py (main): Handle mode 'find'.
* gnulib-tool.py: Finish implementing options --vc-files, --no-vc-files.Bruno Haible2022-08-061-2/+11
| | | | | | | | | * gnulib-tool.py (main): Accept options --vc-files, --no-vc-files. * pygnulib/GLImport.py (GLImport.__init__): Correct parsing of gl_VC_FILES directive. (GLImport.gnulib_cache): Don't treat the value False like None. (GLImport.execute): Skip the .gitignore file manipulations if vc_files is False.
* gnulib-tool.py: Finish implementing option --witness-c-macro.Bruno Haible2022-08-061-2/+10
| | | | | | * gnulib-tool.py (main): Accept option --witness-c-macro. * pygnulib/GLConfig.py (GLConfig.__init__): Remove wrong type check of witness_c_macro argument.
* gnulib-tool.py: Don't initialize local variables too early.Bruno Haible2022-08-061-26/+7
| | | | | | * gnulib-tool.py (main): Initialize each local variable in one place. I prefer to have pylint tell me about uninitialized variables than to get the value None at runtime.
* gnulib-tool.py: Finish implementing option --po-domain.Bruno Haible2022-08-061-1/+19
| | | | | | | | | * gnulib-tool.py (main): Accept option --po-domain. * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable reference. * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in from the gnulib directory. Don't require a shell when invoking wget. After invoking wget, restore the current directory.
* gnulib-tool.py: Finish implementing option --macro-prefix.Bruno Haible2022-08-061-1/+10
| | | | * gnulib-tool.py (main): Accept option --macro-prefix.
* gnulib-tool.py: Refactor --makefile-name option.Bruno Haible2022-08-061-4/+6
| | | | | * gnulib-tool.py (main): Handle option --makefile-name like all other string-valued options.
* gnulib-tool.py: Implement option --no-libtool.Bruno Haible2022-08-061-3/+7
| | | | * gnulib-tool.py (main): Accept option --no-libtool.
* gnulib-tool.py: Refactor --makefile-name option.Bruno Haible2022-08-051-6/+6
| | | | | | | | | * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'. * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'. * pygnulib/GLMakefileTable.py: Update. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
* gnulib-tool.py: Fix 'Unused import' warnings.Bruno Haible2022-08-051-2/+3
| | | | | * gnulib-tool.py: Remove unused imports. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Make option --version work.Bruno Haible2022-08-051-1/+4
| | | | | | | | | | | | | | | * pygnulib/constants.py (__copyright__): Bump copyright year. * pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the second-to-last author. (GLInfo.copyright): Show only the last modification year. (GLInfo.date): Check whether git and GNU date are available. Use 'git log ChangeLog', not 'git log'. Run 'git log' in the gnulib directory, not in the current directory. Search for 'Date:' only at the beginning of a line. As a fallback, look at the first ChangeLog entry. (GLInfo.version): Check whether git is available. Run git-version-gen in the gnulib directory, not in the current directory. Replace '-dirty' with '-modified'. As a fallback, return the empty string. * gnulib-tool.py (main) [--version]: Add a space before the version.
* gnulib-tool.py: Simplify.Bruno Haible2022-08-051-2/+1
| | | | | | * pygnulib/constants.py (compiler): Remove function. * gnulib-tool.py: Use re.compile directly instead. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Coding style: Revisit line breaks.Bruno Haible2022-08-041-28/+47
| | | | | | * gnulib-tool.py: Avoid line breaks at arbitrary points inside expressions. Use line breaks to clarify [... for ...] iterations. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Implement options --cache-modules, --no-cache-modules.Bruno Haible2022-08-041-2/+9
| | | | | | | | * gnulib-tool.py (main): Accept options --cache-modules, --no-cache-modules. * pygnulib/GLConfig.py: Remove modcache property and constructor argument. * pygnulib/GLInfo.py (GLInfo.usage): Don't document these no-op options.
* gnulib-tool.py: Use mainstream/GNU coding style.Bruno Haible2022-08-041-3/+3
| | | | | | * gnulib-tool.py: Break lines before the % operator, not after. * pygnulib/*.py: Likewise. Avoid line breaks when the resulting lines are not too long.
* gnulib-tool.py: Implement option --single-configure.Bruno Haible2022-08-041-1/+9
| | | | | | * gnulib-tool.py (main): Accept option --single-configure. Pass its value to the GLConfig constructor. * pygnulib/GLTestDir.py (GLTestDir.execute): Remove debugging output.
* gnulib-tool.py: Implement options --without-c++-tests etc.Bruno Haible2022-08-041-25/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnulib-tool.py (main): Accept options --without-c++-tests, --without-longrunning-tests, --without-privileged-tests, --without-unportable-tests. Improve error message for --copy-file with invalid number of arguments. Check for invalid options given in --import, --add-import, --remove-import, --update modes. Pass both sets of test categories to the GLConfig constructor. * pygnulib/GLConfig.py (GLConfig.__init__): Accept incl_test_categories and excl_test_categories instead of testflags. (checkInclTestCategory): Renamed from checkTestFlag. (enableInclTestCategory): Renamed from enableTestFlag. (disableInclTestCategory): Renamed from disableTestFlag. (getInclTestCategories): Renamed from getTestFlags. (setInclTestCategories): Renamed from setTestFlags. (resetInclTestCategories): Renamed from resetTestFlags. (setInclTestCategory, checkExclTestCategory, enableExclTestCategory, disableExclTestCategory, getExclTestCategories, setExclTestCategories, resetExclTestCategories): New methods. * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Accept two booleans as second and third constructor arguments. (transitive_closure): Correct the determination of whether to include each module, depending on the with-* and without-* options. (transitive_closure_separately): Update. * pygnulib/GLMakefileTable.py: Update. * pygnulib/GLImport.py (__init__, actioncmd, gnulib_cache, execute): Update. * pygnulib/GLTestDir.py (GLTestDir.__init__, GLTestDir.execute, GLMegaTestDir.__init__): Update.
* gnulib-tool.py: Implement option --without-tests.Bruno Haible2022-08-031-0/+4
| | | | * gnulib-tool.py (main): Accept option --without-tests.
* gnulib-tool.py: Fix broken 'for' loop.Bruno Haible2022-08-031-29/+21
| | | | | | * gnulib-tool.py (main): Canonicalize inctests before creating the GLConfig. Rewrite a broken 'for' loop. * pygnulib/GLConfig.py (GLConfig.setTestFlags): Remove unused statement.
* gnulib-tool.py: Follow gnulib-tool changes, part 23.Bruno Haible2022-08-031-5/+8
| | | | | | | | | | | | | | | | | | | | Follow gnulib-tool changes 2016-11-11 Bruno Haible <bruno@clisp.org> gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license. 2016-12-02 Nikos Mavrogiannopoulos <nmav@gnutls.org> gnulib-tool (func_import): Adhere to the license guideline ... 2016-12-02 Daiki Ueno <ueno@gnu.org> gnulib-tool (func_import): Relax the regex ... * gnulib-tool.py: For --lgpl, accept value 3orGPLv2. * pygnulib/GLInfo.py (GLInfo.usage): Update. * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check. * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache): Update gl_LGPL handling. (GLImport.prepare): Update license compatibility checks and license header rewriting. * pygnulib/GLTestDir.py (GLTestDir.execute): Update license compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
* gnulib-tool.py: Fix unjustified "incompatible license" warnings.Bruno Haible2022-08-031-1/+1
| | | | | | * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when the dependency module has a license such as "public domain" or "unlimited".
* gnulib-tool.py: Avoid errors when writing to a VFAT file system.Bruno Haible2022-08-031-1/+2
| | | | | | * pygnulib/constants.py (copyfile, copyfile2): New functions. * gnulib-tool.py: Use them instead of shutil. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Improve some error messages.Bruno Haible2022-07-311-17/+22
| | | | | | | * gnulib-tool.py (main): Write "*** Stop." instead of "*** Exit.". (__main__): Print an error message for GLError 5, 13, 14, 15, 16, 17, 18. * pygnulib/GLError.py (GLError.__repr__): Compute one error message, not 19.
* gnulib-tool.py: Implement options --symlink and --local-symlink.Bruno Haible2022-07-311-0/+14
| | | | | | * gnulib-tool.py (main): Handle options --symlink and --local-symlink. * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from os.remove call.
* gnulib-tool.py: Make --copy-file work.Bruno Haible2022-07-311-19/+15
| | | | | | * gnulib-tool.py (main) [copy-file]: Fix reference to uninitialized variable. Fix error handling of os.makedirs. Pass the destdir to the GLFileAssistant.
* gnulib-tool.py: Allow module arguments to occur at any position.Bruno Haible2022-07-311-49/+79
| | | | | | | * gnulib-tool.py (main): Collect the non-option arguments in a single list, regardless of their position. Use parse_known_args instead of parse_args, and give an error message about unknown options ourselves. * gnulib-tool: Fix typo in error message.
* gnulib-tool.py: Make --test behaviour more similar to gnulib-tool.Bruno Haible2022-07-311-1/+1
| | | | * gnulib-tool.py (main) [test]: Remove space from the testdir name.
* gnulib-tool.py: Make option processing more similar to gnulib-tool.Bruno Haible2022-07-311-2/+2
| | | | | * gnulib-tool.py (main): Allow --add-import and --remove-import with 0 modules.
* gnulib-tool.py: Improve compliance with GNU standards.Bruno Haible2022-07-311-9/+11
| | | | | * gnulib-tool.py (main): Handle --help and --version before testing for conflicting modes.
* gnulib-tool.py: Emit error message when conflicting modes are specified.Bruno Haible2022-07-311-2/+2
| | | | | * gnulib-tool.py (main): Fix test of conflicting modes. (Some options produce a value of [], and as a condition, [] evaluates to False.)
* gnulib-tool.py: Remove most short options.Bruno Haible2022-07-311-66/+68
| | | | | * gnulib-tool.py (main): Reorder the list of options. Remove most short options, for consistency with gnulib-tool.
* gnulib-tool.py: Follow gnulib-tool changes, part 19.Bruno Haible2022-07-311-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow gnulib-tool changes 2015-12-09 Pavel Raiskup <praiskup@redhat.com> gnulib-tool: allow multiple --local-dir usage 2019-02-14 Bruno Haible <bruno@clisp.org> gnulib-tool: Improve handling of multiple --local-dir options. * gnulib-tool (func_reconstruct_cached_dir): When the argument is absolute, return it unmodified. (func_compute_relative_local_gnulib_path): Renamed from func_count_relative_local_gnulib_path. Add comment. * gnulib-tool.py: Accept multiple --local-dir options and collect the values into localpath. * pygnulib/GLConfig.py: Take a localpath argument instead of a localdir argument. (getLocalDir, setLocalDir, resetLocalDir): Remove methods. (getLocalPath, setLocalPath, resetLocalPath): New methods. * pygnulib/GLFileSystem.py (CopyAction): New class. (GLFileSystem.lookup): Consider all dirs in localpath. (GLFileSystem.shouldLink): New method. (GLFileAssistant): Use shouldLink. * pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all dirs in localpath. (GLModuleSystem.list): Likewise. * pygnulib/GLEmiter.py: Update. * pygnulib/GLImport.py (GLImport.__init__): Put the argument of gl_LOCAL_DIR into localpath, not localdir. (GLImport.actioncmd): Consider all dirs in localpath. (GLImport.relative_to_destdir, GLImport.relative_to_currdir): New methods. (GLImport.gnulib_cache): Combine all dirs in localpath. Use self.relative_to_destdir. * pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
* gnulib-tool.py: Clean up imports.Bruno Haible2022-07-311-4/+0
| | | | | * gnulib-tool.py: Remove unused constants. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Assume Python 3.Bruno Haible2022-07-311-4/+0
| | | | | * gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Assume Python 3.Bruno Haible2022-07-311-6/+4
| | | | | * gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string. * pygnulib/*.py: Likewise.
* gnulib-tool.py: Use mainstream coding style.Bruno Haible2022-07-291-2/+8
| | | | | | | | | * gnulib-tool.py: Clarify the coding style. Fix some pycodestyle warnings. * pygnulib/constants.py: Likewise. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLMakefileTable.py: Likewise.
* gnulib-tool.py: Fix error in Ubuntu 22.04.Bruno Haible2022-07-291-1/+1
| | | | * gnulib-tool.py: Search for python3 in $PATH.
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* gnulib-tool.py: import mktempTim Rühsen2018-06-291-1/+2
| | | | | | * gnulib-tool.py: Import mktemp from tempfile Signed-off-by: Dmitry Selyutin <ghostmansd@gmail.com>
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|