Commit Graph

83 Commits

Author SHA1 Message Date
Alexey Neyman
0fe21f8db8 Config v2: select relevant parts of each package version
Also, remove a couple of config options that dealt with package versions
that have been since retired.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-30 00:09:30 -08:00
Alexey Neyman
adc16046f7 Add upgrade logic to version-check.sh
Slightly rework config version detector to catch the case where neither
CONFIG_VERSION/CONFIG_VERSION_CURRENT is defined in the config file.

Add olddefconfig and use it after the upgrade.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-27 22:55:26 -08:00
Alexey Neyman
57e5be632d Basic framework for checking config file version
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-26 13:13:32 -08:00
Alexey Neyman
40d5bf6440 Add moxiebox as a choice for libc
This required some rework of the libc selection, as moxiebox is a layer on
top of another libc - newlib.

Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will
not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox
needs from libcrypto is SHA256, and it already includes a standalone implementation
of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use
that implementation for the host binary, too.

Also, automate collecting/printing the list of all packages in a given category
(e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given
category.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 10:10:51 -08:00
Alexey Neyman
35bec76b63 Fix installation of the license file
... for ct-ng configured without --enable-local. Also, install
licenses in subdirectories of the components.

Also, ct-ng configured with --enable-local removed the scripts directory
upon `ct-ng distclean`.

Also, misspelled CT_WGET/CT_CURL variables prevented use of
`ct-ng updatetools`.

Fixes #1091.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-12 01:19:04 -08:00
Alexey Neyman
2a36181f70 Fix distclean
After d4aa8d9, make distclean removes scripts in ct-ng configured
with --enable-local.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-10 14:57:17 -08:00
Alexey Neyman
d4aa8d954d Fix CT_LIBEXEC_DIR and CT_DOC_DIR if "local" ct-ng is run from other dir
Also, no need to use $(shell) if make has the same builtin.

Fixes #933.
Closes #1081.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-03 14:20:45 -07:00
Daniel Black
a98584c897 Allow ct-ng to be run from non-repo directories
closes #993

Signed-off-by: Daniel Black <daniel@linux.ibm.com>
2018-11-03 14:13:08 -07:00
Alexey Neyman
d72f065e71 Check if .config is a regular file before clobbering it
Fixes #1014.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-01 23:19:12 -07:00
Alexey Neyman
204fef03f6 Doh. Change the name of the substituted variable
... to match the substituted name.

Fixes #966.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-15 16:52:45 -07:00
Alexey Neyman
4e7d0906c1 Support out-of-tree local builds
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 14:39:56 -07:00
Alexey Neyman
355f6f03fb Cannot ignore 'make install' with automake
Automake does not allow us to place the hooks before its generated actions,
and does not allow us to check MAKECMDGOALS, and does not support a mechanism
for disabling make install (such as noinst_SUBDIRS, requested a few times
on automake mailing list). The only way I could preserve the current behavior
is to have a GNUmakefile wrapper that will convert MAKECMDGOAL into a variable
unknown to automake - which seems too convoluted a solution for the problem
being solved.

Hence the approach is to not override anything for --enable-local. It is now
fully handled by selecting different values for CT_xxx_DIR in ct-ng.in; but
at the build-system level, all the variables remain the same. We just don't
support 'make install' in that case anymore; but the ct-ng in the working
copy can be used after a regular 'make' (or 'make all').

Help message for --enable-local updated accordingly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
f45e29c5ca Restore --enable-local use
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
5159cd7bc0 Adjust the paths to match new stuff location
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
5b95b81ea9 Kill gperf vestiges
Generate paths.sh by configure, do away with paths.mk.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
0dc8565c4f Merge steps.mk into ct-ng
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
69df9ae9dd Remove the need for configure substitutions in scripts
... so that scripts/ directory can be installed verbatim.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
dbe3877285 Install ct-ng
Also, move kconfig.mk into the main driver - we'd want kconfig to be a sub-package
so there's no sense in writing the installation framework for the ct-ng-specific
fragment in an otherwise independent directory.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
d401afbdda Get rid of sub{lib,doc}dir
They don't make sense - using same ct-ng won't work with different versions,
so they cannot coexist in the same prefix.

Also localize other configure variables so that their usage is easier to track.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:02:33 -07:00
Alexey Neyman
d759137c46 Align script names with the ct-ng commands
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-19 21:50:28 -08:00
Alexey Neyman
0346153bdb Save export status for environment vars
... and limit our modifications to our variables.

Fixes #762.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21 08:41:14 -07:00
Alexey Neyman
1b4e784a0b Fix debuild warnings/errors
- Update .gitignore, do not place .gitignore into directories installed
in bulk
- Remove executable permissions and shebangs from the scripts that are
supposed to be invoked only via ct-ng frontent; prepend them with $(bash).
Despite what showSamples.sh said, it already has some bashisms.
- Remove --with autotools-dev and override dh_update_autotools_config
to avoid having config.{sub,guess} clobbered with older versions
- Install bash completion where Debian (now) expects it
- Update man page to use .\" as the comment delimiter, instead of
undefined macro (."); also, minor text edits.
- Install kconfig.mk without execute permission.
- Remove shell wrappers from 170-localedef-fix-trampoline.patch, we
do not use that for applying patches
- Revoke execute permissions on 210-expat.sh
- Get flags from dpkg-buildflags if available

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-07 22:38:53 -07:00
Alexey Neyman
c9dad33728 Use config from the install location
... no need to create a local symlink.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 23:33:36 -07:00
Alexey Neyman
35f89c4064 Detect both wget/curl and allow user to select the agent
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-12 22:02:23 -08:00
Alexey Neyman
955f5bc0b8 Get rid of .config.2.
Now handled by CT_LoadConfig.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-19 18:08:29 -08:00
Alexey Neyman
c0cc73cd6f Install canadian crosses into a separate subdir.
Makes them sorted out by host, and removes the need for similar hack in
samples.mk.

Change how canadian crosses are named: using `=' character resulted in
Glibc build failure.

Move loading config into a common function, CT_LoadConfig.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-19 18:08:29 -08:00
Alexey Neyman
dcb438a9dc Fix ct-ng show-config.
If configured with --enable-local, CT_NG is exported as plain 'ct-ng'
without any path. showSamples.sh then fails to invoke ct-ng (as current
directory is not in $PATH).

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-10 18:29:14 -08:00
Bryan Hundven
85f98147f5 Merge pull request #233 from stilor/fix-build-all
Fix build-all
2015-11-04 02:50:05 -08:00
Alexey Neyman
5844514e74 Fix samples using GMP 4.3.2.
Some older versions of configure (including the one in GMP 4.3.2)
interpret the $ECHO environment variable as the `echo' utility to
use. CT-NG sets the variable to `:' and exports it if V=0 or V=1
is supplied, breaking the samples using such configure. This currently
includes bfin-unknown-linux-uclibc and powerpc-unknown-linux-uclibc.

Also, correct the description of the V= variable - V=0 is *not* the
default; in fact, default does not correspond to any of the V=[012]
values.

Signed-off-by: Alexey Neyman <stilor@att.net>
2015-10-30 16:24:52 -07:00
Alexey Neyman
1ad356c178 Clean up new .build-all directory.
Signed-off-by: Alexey Neyman <stilor@att.net>
2015-10-30 16:24:52 -07:00
Alexey Neyman
263e8026ec Change sed monstrosity into a make variable.
The convoluted sed expression was doing what is already available in
make as `$*'.

Signed-off-by: Alexey Neyman <stilor@att.net>
2015-10-30 10:32:16 -07:00
Alexey Neyman
319023c7af Implement 'ct-ng source'.
Provides a simpler alternative to editing config to enable
CT_ONLY_DOWNLOAD, doing ct-ng build and then restoring .config.

Signed-off-by: Alexey Neyman <stilor@att.net>
2015-10-30 01:23:53 -07:00
Yann E. MORIN
643d93e0dc all: remove references to creating a tarball
This has been broken for ages, time to finaly remove it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-11-24 18:25:27 +01:00
Yann E. MORIN
e20dcac9dd ct-ng: 'clean' removes the build dir
It makes more sense to remove the build dir on 'clean' rather than
on 'distclean', since the latter also trashes the .config file.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-28 21:05:09 +02:00
Yann E. MORIN"
ffee93e4d2 docs: update my e-mail
Since anciens.enib.fr has been dead for two months now, without any
hope of recovery, update my e-mail to point to @free.fr instead.

Reported-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-06 21:36:10 +01:00
Johannes Stezenbach
10177ac2c2 help: fix typo
Signed-off-by: Johannes Stezenbach <js@sig21.net>
2012-02-13 21:07:55 +01:00
Yann E. MORIN"
f2f6d799c5 configure: handle --program-prefix
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-17 23:05:01 +02:00
Yann E. MORIN"
2c3b6d2b71 scripts: munge .config to handle array variables
Transfrom array variables from pure strings (in the kconfig output)
into proper bash arrays declarations, for feeding to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-19 22:29:49 +02:00
Yann E. MORIN"
7bfa4139ad scripts: leave changelog in build dir, copy to install dir
Users tend to look for the build log in the current working directory,
rather than in the toolchain's installation dir. While bundling the build
log in the toolchain installation dir is nice for distribution and review,
it can be easier to have the build log readily available in the working
directory, as it is quicker to get to it.

So, the build log stays in the working directory until the toolchain is
completely and successfully built, and then a (compressed) copy is made.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-20 00:02:21 +01:00
Yann E. MORIN"
bd8723cd92 scripts: fix distclean
Do not fail in case either one or both of target/ and
.build/ directories are missing.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-06 22:54:48 +02:00
Yann E. MORIN"
077e46ff10 scripts: update distclean
The toolchains are now built in .build/ rather than in targets/
so distclean has to get rid of that.

We also clean up the old dir, as users may have old samples that
still refer to the old location.

Do not hide messages during distclean, and do not ignore errors.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-05 23:59:16 +02:00
Yann E. MORIN"
a211f4100d docs: split into multiple files
The overview.txt file has evolved into more than just an overview.
Split it into chapters, and include the misc tutorials.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-14 16:37:11 +02:00
Yann E. MORIN"
e5a007415a scripts: misc help and auto-complete fixes
- don't list samples in the main help screen
- improve the samples listing in list-samples
- don't document the 'config' action, it's long dead
- document the 'V' environment variable
- improve on START, STOP and PREFIX environment variables
- add PREFIX and V to autocomplete
- advertise auto-complete at install time
2010-04-02 00:18:26 +02:00
Yann E. MORIN"
d691923e88 config: fix generated config files when GREP_OPTIONS set --color=always
grep is used when generating some .in files (in config.gen). If GREP_OPTIONS
contains --color=always, then the generated files will contains some escape
sequences setting the color, and mconf would choke on those escape sequences.

Always set and export an empty GREP_OPTIONS to avoid that.

Issue reported by Kevin Kirkup <kevin dot kirkup at gmail dot com> :
  http://sourceware.org/ml/crossgcc/2009-12/msg00026.html
2009-12-29 21:16:51 +01:00
Yann E. MORIN"
01240b9fbf scripts: fix updating config.{sub,guess} 2009-10-30 19:49:51 +01:00
Yann E. MORIN"
e89072b5a5 Add a new action: show-tuple
- in a directory containing a crosstool-NG configuration,
  prints the tuple of the configured target to stdout.

 -------- diffstat follows --------
 /trunk/Makefile.in             |    4     3     1     0 +++-
 /trunk/scripts/showTuple.sh.in |   30    30     0     0 ++++++++++++++++++++++++++++++
 /trunk/ct-ng.comp              |    2     1     1     0 +-
 /trunk/ct-ng.in                |   10     9     1     0 +++++++++-
 4 files changed, 43 insertions(+), 3 deletions(-)
2009-05-13 18:10:47 +00:00
Yann E. MORIN"
c7a1e6a4da Use the paths found by ./configure in the ct-ng.in makefile script and its fragments.
/trunk/kconfig/kconfig.mk |    2     1     1     0 +-
 /trunk/samples/samples.mk |   18     9     9     0 +++++++++---------
 /trunk/config/config.mk   |   10     5     5     0 +++++-----
 /trunk/ct-ng.in           |   22    13     9     0 +++++++++++++---------
 4 files changed, 28 insertions(+), 24 deletions(-)
2009-01-26 18:36:02 +00:00
Yann E. MORIN"
f6a8ed369f Small semantic fix in ct.ng(.in): use make builtin variable to know the make-script name.
/trunk/ct-ng.in |   10     6     4     0 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
2009-01-19 21:57:55 +00:00
Yann E. MORIN"
420f3fdd25 Rename scripts/crosstool.sh to scripts/crosstool-NG.sh.
After all, this is not crosstool, but really crosstool-NG!

 /trunk/steps.mk |    2     1     1     0 +-
 /trunk/ct-ng.in |    2     1     1     0 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
2009-01-18 17:45:10 +00:00
Yann E. MORIN"
eca38a0246 Use ./configure-discovered paths in Makefile.
/trunk/Makefile.in |   55    31    24     0 +++++++++++++++++++++++++++++++------------------------
 /trunk/ct-ng.in    |    2     1     1     0 +-
 2 files changed, 32 insertions(+), 25 deletions(-)
2009-01-18 15:40:02 +00:00