summaryrefslogtreecommitdiff
path: root/scripts/functions
AgeCommit message (Collapse)AuthorFilesLines
2009-11-30scripts: protect against partially extracted sourceYann E. MORIN"1-0/+11
In case of failure (eg. user hitting Ctrl-C), avoid extracting over partially extracted source. Will help once we have git available.
2009-11-29scripts: handle custom or empty extension when extractingYann E. MORIN"1-8/+10
2009-11-25scripts/functions: do not double check if downloads are allowedYann E. MORIN"1-9/+0
Only call the *_get functions if downloads are allowed, so there is no need to check it again in the retrieval wrappers.
2010-01-03scripts/functions: make aria2 less verbose when downloadingYann E. MORIN"1-2/+2
2010-01-01scripts/functions: fix downloading with aria2Yann E. MORIN"1-1/+1
In case the remote file does not exist (and probably for some other reasons as well), aria2 nonetheless creates an empty file (or not empty for some other reasons). The solution is to delete the file whenever aria2 fails.
2010-01-01scripts/functions: fix using Aria2Yann E. MORIN"1-2/+2
Latest aria2 no longer recognise the --retry-wait option.
2009-12-30scripts/functions: add aria2, a powerfull downloaderYann E. MORIN"1-2/+21
aria2 is a powerfull downloader that is capable of chunking and parallel retrieval. Due to li;itations in crosstool-NG retrieval facilities, it's not possible to take fully advantage of aria2. It might happen that, in the future, those limitations get lifted away, so we can take use features such as parallel downloading from more than one server at the same time. For now, it should still speed up downloads thanks to parallel downloading of chunks.
2009-12-29scripts/functions: simplify wget vs. curl checkYann E. MORIN"1-5/+7
2009-11-16config/global: enable not using patches at allYann E. MORIN"1-0/+1
It can be needed to build a toolchain with no patch at all.
2009-10-26libc/newlib: allow using CVS snapshotsYann E. MORIN"1-2/+2
The newlib "team" rolls new releases about once a year (december). This is quite a long time between releases, in case code was fixed. So, allow user to use a CVS snapshot to benefit early from fixes and enhancements to newlib.
2009-10-26functions: allow using sub-dir of a moduleYann E. MORIN"1-3/+14
Some projects' module (eg. newlib) are checked-out into a sudirectory rather than into their own directory. Handle this case in the CT_GetCVS function.
2009-10-21libc/newlib: allow using newlib with archs other than avr32Yann E. MORIN"1-1/+1
2009-10-23scripts/functions: Fix a variable name.Frederic Roussel1-1/+1
Signed-off-by: Frederic Roussel <fr.frasc@gmail.com>
2009-09-06log functions: fix CT_DoLog and CT_DoExecLogYann E. MORIN"1-2/+2
$@ and $* are different when in double quotes; use $* to print the message.
2009-08-31config: add fallback to patch orderYann E. MORIN"1-0/+3
Add the possibility to fallback to either bundled or local patches if local or bundled are missing.
2009-08-31config: add the local,bundled patch orderYann E. MORIN"1-0/+1
This ordering first applies the local patches, then the bundeld ones.
2009-08-31config: make selecting the patch origin a choice rather than a boolYann E. MORIN"1-9/+17
2009-08-31functions: do not over-detect error when patchingYann E. MORIN"1-1/+0
2009-06-22[functions] Allow newlines (\n) in log messagesYann E. MORIN"1-1/+1
Allow caller to log messages with embedded newlines when calling CT_DoLog and other logging functions (eg. CT_Abort...).
2009-05-27/devel/gcc-4.4:Yann E. MORIN"1-0/+30
- functions: add a utility function that sets and exports LD_LIBRARY_PATH -------- diffstat follows -------- /devel/gcc-4.4/scripts/functions | 30 30 0 0 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
2009-04-20There's no longer any reason to require GNU awk:Yann E. MORIN"1-2/+2
- the only part that required it (socks proxy settings) is gone, - all remaining awk scripts are POSIXly correct (or should be). -------- diffstat follows -------- /trunk/configure | 5 2 3 0 ++--- /trunk/Makefile.in | 2 0 2 0 -- /trunk/scripts/build/kernel/linux.sh | 2 1 1 0 +- /trunk/scripts/build/internals.sh | 1 0 1 0 - /trunk/scripts/build/mpfr.sh | 2 1 1 0 +- /trunk/scripts/functions | 4 2 2 0 ++-- /trunk/scripts/saveSample.sh.in | 4 2 2 0 ++-- 7 files changed, 8 insertions(+), 12 deletions(-)
2009-04-19Simplify the mirror settings.Yann E. MORIN"1-4/+3
-------- diffstat follows -------- /trunk/scripts/functions | 7 3 4 0 ++--- /trunk/config/global/download.in | 60 14 46 0 +++++++++++----------------------------------- 2 files changed, 17 insertions(+), 50 deletions(-)
2009-04-19Get rid of the proxy settings, once and for all.Yann E. MORIN"1-100/+0
They have nothing to do in here, just let the user configure his/her system appropriately. -------- diffstat follows -------- /trunk/scripts/build/libc/eglibc.sh | 1 0 1 0 - /trunk/scripts/functions | 100 0 100 0 ----------------------------- /trunk/config/global/download.in | 148 0 148 0 ------------------------------------------- 3 files changed, 249 deletions(-)
2009-04-06Use "${awk}", not gawk.Yann E. MORIN"1-2/+2
/trunk/scripts/build/kernel/linux.sh | 2 1 1 0 +- /trunk/scripts/build/mpfr.sh | 2 1 1 0 +- /trunk/scripts/functions | 4 2 2 0 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
2009-03-27Only create the state dir if asked for a restartable build:Yann E. MORIN"1-3/+12
- introduce the config dir, where components can store their config files - move the munged uClibc config file to the config dir - now, the state dir really is an indication that a build can be restarted Thanks to Groleo Marius <groleo@gmail.com> for spotting the inconsistency of the state dir usage, and suggesting this change. /trunk/scripts/build/libc/uClibc.sh | 6 3 3 0 +++--- /trunk/scripts/crosstool-NG.sh.in | 9 7 2 0 +++++++-- /trunk/scripts/functions | 15 12 3 0 ++++++++++++--- 3 files changed, 22 insertions(+), 8 deletions(-)
2009-03-27Detect and abort on partially patched component.Yann E. MORIN"1-3/+15
/trunk/scripts/functions | 18 15 3 0 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
2009-03-24Log the save/restore messages at a level that is always visible.Yann E. MORIN"1-2/+5
/trunk/scripts/functions | 7 5 2 0 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
2009-03-15When patching, always assume the package has been previously extraacted ↵Yann E. MORIN"1-8/+3
(don't check). "chmod u+w" the full src tree: because of nochdir and cvs snapshots, we can't reliably know were we are... /trunk/scripts/functions | 11 3 8 0 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
2009-03-13Correctly use CT_DoExecLog with wget and curl.Yann E. MORIN"1-8/+8
/trunk/scripts/functions | 16 8 8 0 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
2009-03-08Add CT_GetSVN to commonalise retrieval from SVN (ala CT_GetCVS).Yann E. MORIN"1-1/+33
/trunk/scripts/functions | 34 33 1 0 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
2009-03-04Check that a pacakge was previously extracted prior to patching.Yann E. MORIN"1-3/+5
Fix a comment. /trunk/scripts/functions | 8 5 3 0 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
2009-03-04Move do_finish from scripts/functions to its own file in ↵Yann E. MORIN"1-48/+0
scipts/build/internals.sh. /trunk/scripts/build/internals.sh | 907 4 903 0 --------------------------------------------- /trunk/scripts/addToolVersion.sh | 8 4 4 0 /trunk/scripts/crosstool-NG.sh.in | 1 1 0 0 + /trunk/scripts/functions | 48 0 48 0 -- 4 files changed, 9 insertions(+), 955 deletions(-)
2009-03-03Allow user to add a directory component in the sys-root path.Yann E. MORIN"1-1/+1
Rename CT_DEBUG_INSTALL_DIR to CT_DEBUGROOT_DIR (to match CT_SYSROOT_DIR). As a side effect, fix creating lib64->lib symlinks. /trunk/scripts/build/debug/100-dmalloc.sh | 2 1 1 0 +- /trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0 +- /trunk/scripts/build/debug/300-gdb.sh | 6 3 3 0 +++--- /trunk/scripts/build/debug/500-strace.sh | 2 1 1 0 +- /trunk/scripts/build/debug/200-duma.sh | 6 3 3 0 +++--- /trunk/scripts/crosstool-NG.sh.in | 16 7 9 0 +++++++--------- /trunk/scripts/functions | 2 1 1 0 +- /trunk/config/toolchain.in | 17 17 0 0 +++++++++++++++++ 8 files changed, 34 insertions(+), 19 deletions(-)
2009-02-19Fix extracting tarballs.Yann E. MORIN"1-1/+5
/trunk/scripts/functions | 6 5 1 0 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
2009-02-10"chmod -R u+w" extracted tarballs, as some may have read-only files in them ↵Yann E. MORIN"1-0/+3
(ncurses-5.7 does). /trunk/scripts/functions | 3 3 0 0 +++ 1 file changed, 3 insertions(+)
2009-02-01Fix populate to correctly use tools discovered via ./configure.Yann E. MORIN"1-3/+8
/trunk/scripts/functions | 11 8 3 0 ++++++++--- /trunk/scripts/populate.in | 6 4 2 0 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-)
2009-02-01Fix removing directories.Yann E. MORIN"1-3/+4
/trunk/scripts/functions | 7 4 3 0 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
2009-01-31Fix downloading with CT_GetFile when no mirror is set.Yann E. MORIN"1-3/+5
/trunk/scripts/functions | 8 5 3 0 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
2009-01-29Update populate:Yann E. MORIN"1-3/+4
- use tools found by ./configure - some POSIX and eye-candy cleanups /trunk/scripts/functions | 7 4 3 0 +++-- /trunk/scripts/populate.in | 70 46 24 0 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 50 insertions(+), 27 deletions(-)
2009-01-20On 20090115.0012+0100, "Andy Johnson" <ajohnson@aecno.com> wrote:Yann E. MORIN"1-0/+42
... I added a step after "debug" called "finish", and moved the code in crosstool.sh after the loop that processes the steps from crosstool.sh into a do_finish function in functions. Thus, it is now possible to restart after the "debug" step to re-do the final few things (clean and compress). /trunk/scripts/crosstool-NG.sh | 38 0 38 0 -------------------------------------- /trunk/scripts/functions | 42 42 0 0 ++++++++++++++++++++++++++++++++++++++++++ /trunk/steps.mk | 3 2 1 0 ++- 3 files changed, 44 insertions(+), 39 deletions(-)
2009-01-20Forced-removing of a non-existing directory breaks the build.Yann E. MORIN"1-3/+10
Noticed by "Andy Johnson" <ajohnson@aecno.com>, who provided a patch that I adapted. /trunk/scripts/functions | 13 10 3 0 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
2009-01-12Fix removing existing directories by chmod'ing them to be user-writeable.Yann E. MORIN"1-0/+7
/trunk/scripts/crosstool.sh | 21 10 11 0 ++++++++++----------- /trunk/scripts/functions | 7 7 0 0 +++++++ 2 files changed, 17 insertions(+), 11 deletions(-)
2009-01-12Don't print anything about LAN mirror if it is not used.Yann E. MORIN"1-7/+9
Don't re-compute a variable that has already been computed. /trunk/scripts/functions | 16 9 7 0 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
2009-01-06Add an option to forbid downloads.Yann E. MORIN"1-0/+6
Idea and code-base from Don Elwell <don@manifoldlabs.com>, adapted by me. /trunk/scripts/functions | 6 6 0 0 ++++++ /trunk/config/global/download.in | 18 18 0 0 ++++++++++++++++++ 2 files changed, 24 insertions(+)
2009-01-06Message beautification when saving locally.Yann E. MORIN"1-1/+1
/trunk/scripts/functions | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2009-01-05Split CT_ExtractAndPatch in two: CT_Extract and CT_Patch:Yann E. MORIN"1-33/+37
- it is unworkable to have CT_ExtactAndPAtch cope with all those silly glibc addons: - they can have 'short' (as 'ports') or 'long' (as glibc-ports-2.7) names - patches are against eithe the short or long name, but non-uniformly use one or the other - it is the reposibility of the component (glibc in this case) to handle corner cases such as those - update all components to use the new functions /trunk/scripts/build/tools/000-template.sh | 3 2 1 0 +- /trunk/scripts/build/tools/100-libelf.sh | 3 2 1 0 +- /trunk/scripts/build/tools/200-sstrip.sh | 3 2 1 0 +- /trunk/scripts/build/kernel/linux.sh | 3 2 1 0 +- /trunk/scripts/build/binutils.sh | 3 2 1 0 +- /trunk/scripts/build/cc/gcc.sh | 3 2 1 0 +- /trunk/scripts/build/debug/000-template.sh | 3 2 1 0 +- /trunk/scripts/build/debug/100-dmalloc.sh | 3 2 1 0 +- /trunk/scripts/build/debug/400-ltrace.sh | 3 2 1 0 +- /trunk/scripts/build/debug/300-gdb.sh | 9 6 3 0 +++-- /trunk/scripts/build/debug/500-strace.sh | 7 3 4 0 ++-- /trunk/scripts/build/debug/200-duma.sh | 19 8 11 0 ++++------ /trunk/scripts/build/libc/glibc.sh | 14 12 2 0 ++++++- /trunk/scripts/build/libc/uClibc.sh | 13 9 4 0 +++++-- /trunk/scripts/build/libc/eglibc.sh | 14 12 2 0 ++++++- /trunk/scripts/build/gmp.sh | 3 2 1 0 +- /trunk/scripts/build/mpfr.sh | 3 2 1 0 +- /trunk/scripts/functions | 68 36 32 0 +++++++++++++++++++----------------- 18 files changed, 108 insertions(+), 69 deletions(-)
2009-01-05Fix C library addons extraction:Yann E. MORIN"1-1/+1
- renaming the dircetory in CT_ExtratAndPatch is wrong: - patches against the C library addons may be build against the short *or* long name... :-( - symlink is more robust, even if less nice - renaming the directory _after_ CT_ExtractAndPatch is too late: - if patches are against the short name, and we renamed too the long name, patches don't apply - so we'll never reach the point where we rename /trunk/scripts/build/libc/glibc.sh | 1 0 1 0 - /trunk/scripts/build/libc/eglibc.sh | 1 0 1 0 - /trunk/scripts/functions | 2 1 1 0 +- 3 files changed, 1 insertion(+), 3 deletions(-)
2009-01-04Get rid of CT_LIBC_FILE, remove useless CT_MakeAbsolutePath.Yann E. MORIN"1-62/+15
CT_LIBC_FILE: - that one was not easy, as it had sneaked into CT_ExtractAndPatch - which in turn made CT_ExtractAndPatch have references to C library addons - which in turn relieved the C library _extract functions from doing their own job - which in turn imposed some nasty tricks in CT_ExtractAndPatch - which in turn made life easier for the DUMA _get and _extract functions - which unveiled some bizare behavior for pushd and popd: - if using smthg ike: 'pushd foo |bar': - the directory is *neither* changed - *nor* is it pushed onto the stack - which made popd fail CT_MakeAbsolutePath: - used only to make CT_LOCAL_TARBALLS_DIR canonical - which is ((almost) useless: - hopefully, the user entered a full path already - if it's not the case, too bad... /trunk/scripts/build/debug/200-duma.sh | 5 1 4 0 +-- /trunk/scripts/build/libc/glibc.sh | 61 32 29 0 +++++++++++++++++--------------- /trunk/scripts/build/libc/uClibc.sh | 16 10 6 0 +++++--- /trunk/scripts/build/libc/eglibc.sh | 48 26 22 0 ++++++++++++++----------- /trunk/scripts/crosstool.sh | 8 0 8 0 ---- /trunk/scripts/functions | 77 15 62 0 ++++++++-------------------------------- 6 files changed, 84 insertions(+), 131 deletions(-)
2009-01-04Fix aborting when neither wget nor curl are present.Yann E. MORIN"1-1/+1
/trunk/scripts/functions | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2009-01-04Add new wrapper fucntions:Yann E. MORIN"1-35/+91
- retrieve from local storage (CT_GetLocal) - save to local storage (CT_SaveLocal) - retrieve from CVS (CT_GetCVS) - make CT_GetFile and CT_GetCVS use CT_GetLocal and CT_SaveLocal /trunk/scripts/functions | 126 91 35 0 +++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 35 deletions(-)