summaryrefslogtreecommitdiffstats
path: root/util/dofile.pl
AgeCommit message (Collapse)Author
2018-12-06Following the license change, modify the boilerplates in util/, tools/Richard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7766)
2018-07-10util/dofile.pl: require Text::Template 1.46 or newerRichard Levitte
The reason is that we override Text::Template::append_text_to_output(), and it didn't exist before Text::Template 1.46. Fixes #6641 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6682)
2018-03-29Revert "util/dofile.pl: only quote stuff that actually needs quoting"Richard Levitte
This wasn't a good solution, too many things depend on the quotes being there consistently. This reverts commit 49cd47eaababc8c57871b929080fc1357e2ad7b8. Fixes #5772 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5773)
2018-03-20Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5689)
2018-03-06util/dofile.pl: only quote stuff that actually needs quotingRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533)
2017-11-11Many spelling fixes/typo's corrected.Josh Soref
Around 138 distinct errors found and fixed; thanks! Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3459)
2017-08-15Consolidate the locations where we have our internal perl modulesRichard Levitte
Instead of having perl modules under test/testlib, util and util/perl, consolidate them all to be inside util/perl. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4069)
2017-08-11Fix some Typos and indentsFdaSilvaYY
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4108)
2016-09-21util/dofile.pl: report if a template couldn't be loadedRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-20Copyright consolidation: perl filesRich Salz
Add copyright to most .pl files This does NOT cover any .pl file that has other copyright in it. Most of those are Andy's but some are public domain. Fix typo's in some existing files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-22The build files use %disabled, make sure to pass it to themRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-21Don't use 'parent' in util/dofile.plRichard Levitte
Because we're requiring Perl 5.10.0 and the 'parent' didn't appear before Perl 5.10.1, we need to resort to the older parent module declaration style, modifying @ISA. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-10unified build scheme: give util/dofile.pl the possibility to output selectivelyRichard Levitte
Under certain conditions, one might not want to output certain sections of a template file. This adds the functions output_off() and output_on(), reachable inside the templates. And example usage in a Makefile template could be this: @ : {- output_off() if $config{no_shared}; "" -} ... lines dealing with shared libraries @ : {- output_on() -} Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-25Generate warning textRichard Levitte
Now that we're using templates, we should warn people not to edit the resulting file. We do it through util/dofile.pl, which is enhanced with an option to tell what file it was called from. We also change the calls so the template files are on the command line instead of being redirected through standard input. That way, we can display something like this (example taken from include/openssl/opensslconf.h): /* WARNING: do not edit! */ /* Generated by Configure from include/openssl/opensslconf.h.in */ Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-25Refactor file writing - Remake Makefile.org into a templateRichard Levitte
It is time for Makefile.org to fold into the new regime and have a run through util/dofile.pl. This forces some information out of there and into Configure, which isn't a bad thing, it makes Configure increasingly the center of build information, which is as it should be. A few extra defaults were needed in the BASE template to get rid of warnings about missing values. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-23Remove extra unused variable in util/dofile.plRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - adapt util/dofile.pl to use with_fallbackRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - introduce template driven file writingRichard Levitte
apps/CA.pl and tools/c_rehash are built from template files. So far, this was done by Configure, which created its own problems as it forced everyone to reconfigure just because one of the template files had changed. Instead, have those files created as part of the normal build in apps/ and in tools/. Furthermore, this prepares for a future where Configure may produce entirely other build files than Makefile, and the latter can't be guaranteed to be the holder of all information for other scripts. Instead, configdata.pm (described below) becomes the center of configuration information. This introduces a few new things: %config a hash table to hold all kinds of configuration data that can be used by any other script. configdata.pm a perl module that Configure writes. It currently holds the hash tables %config and %target. util/dofile.pl a script that takes a template on STDIN and outputs the result after applying configuration data on it. It's supposed to be called like this: perl -I$(TOP) -Mconfigdata < template > result or perl -I$(TOP) -Mconfigdata templ1 templ2 ... > result Note: util/dofile.pl requires Text::Template. As part of this changed, remove a number of variables that are really just copies of entries in %target, and use %target directly. The exceptions are $target{cflags} and $target{lflags}, they do get copied to $cflags and $lflags. The reason for this is that those variable potentially go through a lot of changes and would rather deserve a place in %config. That, however, is for another commit. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>