summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove TmpModuleexperimental/gsoc/refactoringMatthias Paulmier2018-08-076-401/+345
| | | | | | - lib/Automake/ConfVars.pm: add the am_install_var function. - lib/Automake/Variables.pm: add shadow_unconditionally, am_primary_prefixes and append_exeext.
* Modify all tests to use the Test::Simple libMatthias Paulmier2018-08-0214-350/+225
| | | | | | | | | | All tests now use the Test::Simple library. We keep the distinction between pl (pure perl) and plt (perl + Test::Simple) in case someone wants to write a perl tests without this lib. - t/pm/*: All tests now use the plt extension and the Test::Simple library. - t/pm/CondStack.pl: Remove it as it was not well built and the test results were false.
* Move the END sub to another moduleMatthias Paulmier2018-08-015-24/+45
| | | | | This fixes the warning we had in bcbc407fb where the STDOUT handle was closed and reopened.
* Add test for Automake::FileMatthias Paulmier2018-07-272-0/+80
| | | | | | | | | | | | | | | | This tests the make_paragraphs method from the Automake::File library. This uses the newly added .plt file extension as we use the Test::Simple library. - t/pm/File.pl: Add it. FIXME: Their is a bug with the test that says: Filehandle STDOUT reopened as $fh only for input at /usr/share/perl/5.26/Test2/IPC/Driver/Files.pm line 144 during global destruction. It only happens when Automake modules are included. I suspect this comes from the Automake::General module but this needs to be investigated.
* Add extension for perl tests using Test::SimpleMatthias Paulmier2018-07-271-1/+3
| | | | | This is a temporary extension as we will transition all tests to use Test::Simple.
* lib/Automake/File.pm: Change the way make_paragraphs worksMatthias Paulmier2018-07-273-13/+13
| | | | | | We now call preprocess_file before make_paragraphs. This is useful to test the lib as we can now feed a file handle (Automake::XFile) directly to make_paragraphs (and not simply a filename).
* Remove useless importsMatthias Paulmier2018-07-252-2/+0
| | | | | Their was an include cycle between File.pm and Variable.pm. This is now fixed.
* lib/Automake/File.pm: Move functions to this moduleMatthias Paulmier2018-07-253-139/+142
|
* lib/Automake/File.pm: Modifie file_contents_internalMatthias Paulmier2018-07-203-223/+237
| | | | | | | | | | This function now takes a list of paragraph as argument instead of building it in its code. This is the first step in the modification of this function to be able to test it with files that don't "physically" exist in the actual file system. * lib/Automake/File.pm: Start the modification of file_contents_internal for unit testing
* t/pm: Add tests for SilentRules.pmMatthias Paulmier2018-07-111-0/+60
| | | | * t/pm/SilentRules.pl: New tests for the SilentRules module.
* Move functions to LangHandlingMatthias Paulmier2018-07-065-429/+466
| | | | | | | | | | These functions are language specific functions. To achieve this, we had to add a new module "TmpModule". The functions in this module should be relocated when we find a better place. * lib/Automake/LangHandling.pm: Add handle_emacs_lisp, handle_java, handle_python to this module. * lib/Automake/LangHandling: Add this module to avoid include cycles.
* Remove sub prototypeMatthias Paulmier2018-07-041-1/+0
|
* Add the HandleConfigure moduleMatthias Paulmier2018-07-035-954/+1002
| | | | | | | | | | | This module handles the configure.ac files on the Automake side. It required to modify a bit the scan_autoconf_[file|traces] functions so we can pass them the environment var for autoconf as arguments from the main file (otherwise it wouldn't work). * lib/Automake/HandleConfigure.pm: Module for handling configure.ac for automake. * lib/Automake/Utils.pm: Add some necessary functions for the new HandleConfigure module.
* Fix copyright for Texi.pmMatthias Paulmier2018-07-031-1/+1
|
* Add the Standards.pm libraryMatthias Paulmier2018-07-023-46/+76
| | | | | The library provides functions for checking that the required files in a given standard (GNU org GNITS) are present.
* LangHandling: Fix missing importMatthias Paulmier2018-06-291-0/+1
| | | | | | | The tests that could help me spot this bug was skipped on my machine. The RULE_AUTOMAKE constant is used in this file so we need the to import the Automake::RuleDef module.
* Move yet more functions to Utils.pmMatthias Paulmier2018-06-292-76/+71
| | | | | | | | | | backanme: get the back path to the Makefile directory. locate_am: locate the *.am file for which a *.in file exists get_number_of_threads: returns the number of threads on which Automake should run. * lib/Automake/Utils.pm: Add the backname, locate_am, get_number_of_threads functions to the Automake::Utils module.
* Add a module for handling Texinfo filesMatthias Paulmier2018-06-283-528/+565
| | | | * lib/pm/Texi.pm: New module for handling texinfo files.
* t/pm: Regroup tests by moduleMatthias Paulmier2018-06-2610-173/+66
| | | | | Since we don't have to worry anymore about the tests "fataling" out we can put the then separated tests into the appropriate files.
* t/pm: Fix fake XFAIL perl testsMatthias Paulmier2018-06-268-19/+44
| | | | | | Use eval to fix fail XFAIL perl test and catch fatal errors. * t/pm: No more XFAIL perl tests
* Add a test for the Channels.pm moduleMatthias Paulmier2018-06-252-0/+23
| | | | | | This test is placed in the perl_fake_XFAIL_TESTS meaning it is expected to FAIL but is the correct behavior of the test. It should generate a fatal error with the following message: 'unknown channel test-fatal'.
* lib: Harmonize Exporter package usageMatthias Paulmier2018-06-2226-94/+69
| | | | | Now the modules don't inherit Exporter anymore. We just get the import method from it since it is the only method that interests us.
* Add missing license headersMatthias Paulmier2018-06-222-0/+30
| | | | | * lib/Automake/Requires.pm: Add mising header * lib/Automake/SilentRules.pm: Add missing header
* Rearrange file exports and function prototypesMatthias Paulmier2018-06-223-16/+46
| | | | | * automake.in: Rearrange function prototypes. * lib: Remove useless exports.
* Fix Automake::ErrorsMatthias Paulmier2018-06-221-0/+10
| | | | The module didn't return 1.
* lib: Add new modulesMatthias Paulmier2018-06-225-896/+987
| | | | | | | | | | | In an effort to move out as much as possible from the main script, we create these modules to host the methods. * LangHandling: This module host all the functions for handling languages (functions that define obj directories of the language, rewrite the file extention...). * SilentRules: Declares functions for handling silent rules. * Requires: Functions for requiring configuration files.
* Utils: Add yet more methods to this moduleMatthias Paulmier2018-06-222-50/+49
| | | | Move ̀is_make_dir', ̀push_dist_common' and `canonicalize' to this module.
* Move $gen_copyrightMatthias Paulmier2018-06-221-17/+15
| | | | | | | | We move the variable to the bottom of the file where it is used because we have no real reason to declare it where it was. The added comment has also been removed since it doesn't make sense and isn't useful for the comprehension of this variable. The variable will stay in this file unless we have a real reason to move it out of this file.
* Add the Errors.pm perl moduleMatthias Paulmier2018-06-223-34/+85
| | | | | | | This module takes care of outputing errors for Makefile.am and Configure.ac files. * lib/Automake/Errors.pm: New file for printing errors about am and ac files.
* Fix Copyright of previous commitMatthias Paulmier2018-06-221-4/+3
| | | | To be squashed if this gets merged.
* VarAppend: New moduleMatthias Paulmier2018-06-223-170/+246
| | | | | | | This module is used in Automake::Variable::define to append values to variables. * VarAppend: New module with helper functions for appending to variables.
* lib: Rearrange modules inclusionsMatthias Paulmier2018-06-2223-43/+79
| | | | | | | The use directives are now rearranged to be more easily read (alphabetical order) and we removed some include cycles in the process. * Location.pm: This module now serves the INTERNAL constant.
* Utils.pm: Move global variables to this moduleMatthias Paulmier2018-06-223-52/+61
| | | | | | | | | | | | | | | These global variables are now in lib/Automake/Utils.pm: - $config_aux_dir - $am_config_aux_dir - $config_aux_dir_set_in_configure_ac - $seen_maint_mode - $relative_dir - $seen_canonical - %am_file_cache * Utils.pm: New variables from Global.pm now sit in this module * t/pm/Utils.pl: New test for &locate_aux_dir
* Variable.pm: Split define methodMatthias Paulmier2018-06-221-143/+163
| | | | Split the define method into smaller units easier to maintain and test.
* Variable.pm: Standardize the docsMatthias Paulmier2018-06-221-38/+50
| | | | | | The docs was mainly pod but the newly added methods were not documented that way. This commit standardize that. Of course the private methods stay documented with simple comments.
* t: Add a test for the CondStack moduleMatthias Paulmier2018-06-222-0/+77
| | | | | | | This tests that the &cond_stack_* methods assure the good balance of the conditional stack. * CondStack.pl: New test for the CondStack module.
* Added files: Change license headerMatthias Paulmier2018-06-226-28/+32
| | | | | Change the license header from GPLv3+ to GPLv2+ since Automake has not yet transitioned.
* ConfVars.pm: Move global vars to this moduleMatthias Paulmier2018-06-222-28/+30
| | | | | | The variables are coherent with the methods served by this module. The module still needs some documentation.
* CondStack.pm: Move @cond_stack to this fileMatthias Paulmier2018-06-222-16/+17
| | | | This global variable is better to be served from this module.
* t: Test the flatten methodMatthias Paulmier2018-06-221-1/+22
| | | | | | | | Checks if the output string is a flattened version of the input string. It should remove trailing and leading whitespaces, multiple whitespaces (and replace it with single ones) and line breaks in a given string. * t/pm/Utils.pl: add check_flatten to the test-suite.
* t: Add a test for the Automake::Utils moduleMatthias Paulmier2018-06-222-0/+33
| | | | | | | | | At the moment, we only test the subst subroutine as it is the most trivially testable in the file. * Utils.pl: Added to test the newly added Automake::Utils module * list-of-tests.mk: Added the above test-file to be run in the test-suite
* lib: fix Automake::VariableMatthias Paulmier2018-06-227-353/+663
| | | | | | | | | | | Some methods added to this module were not working properly because they depend on others which stayed in automake.in * ConfVars.pm: Added this module to put the methods in question. * CondStack.pm: Module that takes care of the conditional stack. * Utils.pm: Added some needed utility functions for the above to run properly. * File.pm: Methods that looks at files' content. * local.mk: Added the new modules.
* lib: Move methods to Automake::VariableMatthias Paulmier2018-06-222-329/+150
| | | | | | | | | | | | | | | | | | | Some subs in bin/automake are still moveable to this file but require to move other subs before. * verbose_var: adds a prefix to a variable name. * verbose_private_var: same as verbose_var but for private vars. This method is now private in this module since it is only used once in the. define_verbose_var which has been moved here took. * define_verbose_var: defines verbose variables for silent rules in the generated makefile. * define_verbose_tagvar: calls define_verbose_var with $name as argument * define_variable: define a new Makefile variable. * define_pretty_variable: same as above but for printing in an input file. * define_files_variables: define a variable containing a list of files composed of a specified basename and extension. * define_configure_variable: define a variable and substitute its name by a configure-style text.
* Utils.pm: Add more utility methodsMatthias Paulmier2018-06-222-15/+15
| | | | | | * subst: Method to get a configure-style substitute from a text * file_contents_internal: Return the contents of a file from automake/lib/am. This is a long method that will need some reworking later.
* lib: Add Automake::Utils moduleMatthias Paulmier2018-06-222-41/+70
| | | | | | | | This module contains utility methods to be used in bin/automake. * lib/Automake/Utils.pm: New utility module. * var_SUFFIXES_trigger: Moved to the Automake::Utils module. * locate_aux_dir: Moved to the Automake::Utils module.
* automake.in: Move out var/const declarationsMatthias Paulmier2018-06-223-434/+497
| | | | | | | | | | | | | | This is the first step in modularizing Automake for the Summer of Code project "Modularize Automake to improve its test-suite". The goal here is to move out as much as possible from bin/automake.in in order for it to eventually only call methods from the different modules. * lib/Automake/Global.pm: The Automake::Global package will now hold variable and constant declarations in order to move subroutines that use them out of the main package. * bin/automake.in: The $gen_copyright var/constant was left here because it uses a variable passed directly by the Makefile here. This needs to be looked at later. Te rest of the declarations was moved.
* test-driver.scm: Add "--coverage" optionMathieu Lirzin2018-03-251-9/+28
| | | | | | | * contrib/test-driver.scm: When 'coverage' option is enabled, run tests in the debug vm and trace coverage data. (%options): Add 'coverage'. (show-help): Display option.
* test-driver.scm: Don't guess script name from "--test-name"Mathieu Lirzin2018-03-241-16/+22
| | | | | | | | | 'primitive-load' is used instead of 'load-from-path' since the script is given as a relative file name. For unknown reason, using 'load' fails with GNU Mcron test suite when running 'make distcheck'. * contrib/test-driver.scm: Get the actual script name directly from the command line. Handle the case where that argument is missing.
* test-driver.scm: Inline 'main' procedureMathieu Lirzin2018-03-241-24/+23
| | | | | | | Having a main procedure involves passing the '-e main' command-line argument to 'guile' which makes the test driver a bit less easy to use. * contrib/test-driver.scm (main): Delete. Move body to the top-level.
* maint: Use 'before-save-hook' in "contrib/test-driver.scm"Mathieu Lirzin2018-03-111-3/+3
| | | | | | | | | | This a follow-up to commit 6bab5b26a1241b0e0edd058d2a921989f9a1747c. Use 'before-save-hook' instead of 'write-file-functions' to match what is done in other scripts. * contrib/test-driver.scm: Update hook usage and use 'UTC0' timezone instead of 'UTC'.