Commit Graph

95 Commits

Author SHA1 Message Date
Alexey Neyman
7bcf18bfab Determine whether -E/-r option selects extended regexp
... and then use the right option. See the note in scripts/functions
on where we should use ${foo} and where just 'foo'; this boils down to
whether we can expect the build tools override to be in effect (e.g. in
the actual build scripts) or not (i.e. outside of scripts/build).
While running in scripts/functions, or in scripts/crosstool-NG.sh the
build tools override directory (.build/tools/bin) may have not been
set up (yet, or at all).

Also, modify the installed scripts (populate, xldd) accordingly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-13 22:47:40 -08: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
7a94c81e5b Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.

With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.

While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 20:40:47 -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
3bb2bcd2a3 Add a check for gperf function signature.
Loosely based on:
c9f7b4d356

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-12 23:00:34 -08:00
Yogesh Sharma
4d9a4f5534 samples: install "broken" file
Currently the broken file is not installed when doing an non-local install.
This causes ct-ng list-samples to not notify the user that a sample is
broken.  This commit triggers the creation of the broken file as needed.

Signed-off-by: Yogesh Sharma <ysharm01@harris.com>
2016-09-07 10:16:52 -04:00
Bryan Hundven
1b48c9bd83 Makefile.in: Fix uninstall target
`make uninstall` is ran against `$(TARGETS)`, which includes `lib-kconfig`.
`lib-kconfig` is installed as a part of the `lib` target, so during
uninstall, removing `lib` is enough to also remove `lib-kconfig`.

Filter out `lib-kconfig` during `real-uninstall`.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-19 14:30:20 -08:00
Bryan Hundven
e4bb360748 file modes: Set files to be non-executable
I was going to start doing some autoconf work, and noticed that
configure.in was executable. Then I noticed Makefile.in was executable.

o.O

So, I ran ```find . -type f -executable``` and found a bunch of files
that shouldn't be set executable.

This commit makes them normal files again.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-12 23:18:04 -08:00
Ray Donnelly
2cf7a83fde Cygwin: Link to libintl for gettext
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
2015-11-13 02:17:43 +00:00
Jean-Marie Lemetayer
6b0fa2221a Revert the automated build option
This reverts commits:
 * d6413fe29f.
 * 4f266e1a8c.

Signed-off-by: Jean-Marie Lemetayer <jeanmarie.lemetayer@gmail.com>
2015-10-03 14:35:22 +02:00
Bryan Hundven
4f266e1a8c configure: Add automated build option
This commit introduces a configure time option to let the build know
that this is going to be an automated build.

This forces the build to disable the progress bar, log tool warnings,
and force the log level to debug.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-09-29 16:22:49 -07:00
Ray Donnelly
d2bc2be8db configure: Add --with-gperf option
On OS X, Apple supply an old gperf (3.0.3) with xcode and
xcode commandline tools which causes build failures:

./zconf.hash.c:183:17: error: expected expression
{offsetof(struct kconf_id_strings_t, kconf_id_strings_str2),

.. upgrading to gperf 3.0.4 was sufficient to fix this,
so this option allows the user to specify the gperf
program that they wish to use.

To install gperf 3.0.4 from homebrew, I did:

    brew tap homebrew/dupes
    brew install homebrew/dupes/gperf

.. then passed --with-gperf=$BREWFIX/Cellar/gperf/3.0.4/bin/gperf
to configure

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Message-Id: <CAOYw7dtCmcJ9WiqmQ81MmZeRPcV-tDOqe9=kRDW4uQGuZNd2Ng@mail.gmail.com>
Patchwork-Id: 274892
2013-09-14 02:45:23 +01:00
Ray Donnelly
4e45eb1093 Allow reordered MAKEFLAGS
-R and -r (-Rr) can be reordered to -r and -R (-rR).
This happens with MSYS1/2 gnu-make and mingw32-make,
and triggers "Recursion detected, bailing out..."

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Message-Id: <CAOYw7dsdsg-XaDOwwEWJeUUSo2Vu_UD5GtkSgNTu59ai7yx0cQ@mail.gmail.com>
Patchwork-Id: 258027
2013-07-10 12:40:21 +01:00
Yann E. MORIN"
3342dd74da Makefile: fix parrallel (-j) installs
Currently, we would remove previously installed patches before
installing the new ones. Unfortunately, that does not play well
with heavily parallel installs.

Now, we consider it is the responsibility of the user to first
uninstall any previous version before installing a new one.

Reported-by: Markos Chandras <markos.chandras@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-02-25 21:19:31 +01:00
Titus von Boxberg
49a1602050 Makefile.in: Use only standard options compatible with BSD install
Don't use options specific to FSF's coreutils install.

Signed-off-by: Titus von Boxberg <titus@v9g.de>
Message-Id: <51587db99510a9ec08f8.1352226968@tschetwerikow.boxberg.lan>
Patchwork-Id: 197532
2012-11-06 17:02:06 +01:00
Yann E. MORIN"
9c75afd9d3 configure: check for GNU awk, not any awk
Building glibc requires GNU awk, not any other.

Reported-by: Han Sooloo <hansooloo@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-07-14 18:25:47 +02:00
Yann E. MORIN"
887eefec34 configure: also detect plain grep
We need just 'grep', and we need to be able to call it with 'grep -E'.
Check for 'grep', and bailout if egrep != grep -E

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-17 00:37:59 +01:00
Yann E. MORIN"
b86899a341 scripts: fix tools override
The tools found by the new autostuff configure can contain arguments,
for example: grep -E

This needs separating the paths set for the Makfile from the paths
set for the scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-16 23:36:42 +01:00
Yann E. MORIN"
cb7fcbe1ef kconfig: install compiled frontends
The kconfig frontends are currently instaleld as source files. This is
a remnant of the early times, when I wanted a single installation of
crosstool-NG to be shared across multiple machines, potentially of
different architectures.

This does not really make sense, and it's been a long time since it
was las tpossible in practice.

So, just build the kconfig frontends at make-time, and install them
as we do for all other crosstool-NG dependent files.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-14 18:22:06 +01:00
Yann E. MORIN"
c8e39d6d29 configure: use autoconf to generate configure
Create configure.ac, an autoconf script to generate ./configure
This will be needed by a subsequent patch to properly handle
--build and --host, and more tests, when the kconfig stuff will
be installed pre-built.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-07 22:28:40 +01:00
Michael Hope
89cf5bb67f Makefile: use phony targets
Add 'build', 'build-*', and 'install' as phony targets to the top level
Makefile.

I tend to do everything in tree with the build in a directory called
'build'.  This interfered with the target 'build', making it think the
target was up to date, and stopping scripts/crosstool-NG.sh from being
regenerated.

Added 'install' as I often set the prefix to $PWD/install.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
2011-09-29 12:27:54 +13:00
Yann E. MORIN"
9a9e8385ba configure: use def_bool for available features
It's one line shorter, and easier to read.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-22 17:13:42 +02:00
Titus von Boxberg"
6b9c9e74b2 configure: require libtoolize, create wrapper to it
libtoolize must be checked_for and there needs to be a wrapper
that points to GNU libtoolize since that may be installed
as glibtoolize.
This fixes a problem with building Cloog/PPL that was

Reported-by: "Pierrick Brossin" <pierrick@bs-network.net>
Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
2011-08-22 09:40:31 +02:00
Yann E. MORIN"
770a64c7ff configure: recognise and handle --program-transform-name
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-21 23:11:26 +02:00
Yann E. MORIN"
9ff2560230 configure: recognise and handle --program-suffix
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-19 22:43:01 +02: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"
d706bf2e6b Makefile: introduce PROG_NAME to contain the 'ct-ng' executable name
With the upcomming --program-{prefix,suffix,transform-name} options,
we'll have a need to centralise the actual executable name, that is
now no longer be a constant.

Rather than spread the prefix/suffix through-out the code, just
centralise the name setting in one place. Beside, transform-name
would not be possible without setting the name at a single location.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-19 22:53:48 +02:00
Yann E. MORIN"
cd7f5cb1c6 Makefile: fix samples install
Installing samples was not installing the C library config file
and the reported.by description.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-31 20:44:10 +02:00
Yann E. MORIN"
929fda76b8 Makefile: make it work for auto-completion
The latest autocompletion calls 'make -qp' to get all the possible
targets. This currently fails, as our makefile is calling itself
again and again ad-libitum.

Fix it by detecting that the recursion level is not 0, and bail out
if so. It works so well that it has the side effect of showing only
the 'public' target, and hide our internal ones! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04 17:43:49 +02:00
Yann E. MORIN"
a257ff7da8 configure: add possibility to set arbitrary variable in check_for
If check_for is able to find the required prog/inc/lib, allow it to
set an arbitrary variable to 'y'. This variable is then pushed down
to the kconfig definition.

For example:
  has_or_abort prog=foobar kconfig=has_foobar

If foobar is available, it yields a kconfig variable defaulting to y:
    config CONFIGURE_has_foobar
        bool
        default y

If foobar is missing, it yields a kconfig variable defaulting to n:
    config CONFIGURE_has_foobar
        bool

Thus it is possible to depends on that variabel to show/hide options:
    config SOME_FEATURE
        bool
        prompt "Some feature"
        depends on CONFIGURE_has_foobar

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 22:51:03 +02:00
Yann E. MORIN"
9d38d4427c scripts: fix installation
Changeset e013ddebc063 forgot to install the samples.mk file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-30 23:13:12 +02:00
Yann E. MORIN"
26da02fdaa docs: uninstall the man page
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-29 00:05:41 +02:00
Yann E. MORIN"
ff3fba024c scripts: fix installing samples
It's been a while now that the working directory CT_WORK_DIR has
been changed from 'targets' to '.build'. Fix the install procedure
to properly tweak the installed samples.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-28 23:36:37 +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"
11c957c216 configure: fix --mandir
--mandir points to the base dir of the man pages, so
we have to append our man section below given dir.
2010-07-15 22:34:31 +02:00
Yann E. MORIN"
c8ecae9a5f scripts: enhance Makefile for installation
Split the multiple directory copies into autonomous rules.
Fix the autocompletion message.
2010-06-27 16:40:21 +02:00
Andy Gibbs"
709a529e21 test-suite: correctly install when not --local 2010-06-25 12:33:30 +02:00
Titus von Boxberg
ebf80df032 ct-ng: Add ability to configure and use some GNU tools
Make the paths to libtool, objcopy, objdump, readelf, patch configurable.
2010-05-17 14:11:08 +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
Frederic Roussel"
6d9e27b5b7 Fix typos and adjust some documentation. 2009-11-17 10:01:22 -08:00
Yann E. MORIN"
a83479174b docs: get rid of any reference to the now long-gone svn repository 2009-10-10 13:12:28 +02:00
Yann E. MORIN"
d0528ffa5c ./configure:
- fix a few messages

 -------- diffstat follows --------
 /trunk/Makefile.in |    6     3     3     0 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2009-05-13 21:32:48 +00: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"
1805f4e62d There's no longer any reason to require GNU awk:
- 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-20 21:10:03 +00:00
Yann E. MORIN"
06b48c1518 Set the execute bit on generated script at build time, not install time.
Do not advertise "make install" when ./configure-d with "--local".

 -------- diffstat follows --------
 /trunk/configure   |    8     5     3     0 +++++---
 /trunk/Makefile.in |   10     3     7     0 +++-------
 2 files changed, 8 insertions(+), 10 deletions(-)
2009-04-20 19:57:16 +00:00
Yann E. MORIN"
430ce931e1 Use tools discovered by ./configure in scripts/saveSample.sh
/trunk/Makefile.in              |    7     6     1     0 ++++++-
 /trunk/scripts/saveSample.sh.in |   23    13    10     0 +++++++++++++----------
 2 files changed, 19 insertions(+), 11 deletions(-)
2009-02-01 17:11:46 +00:00
Yann E. MORIN"
534ee284bb Set proper mode to installed files; fixes running when not using --local.
/trunk/Makefile.in |    8     5     3     0 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
2009-02-01 16:17:53 +00:00
Yann E. MORIN"
feb0c60e3b Ignore generated file, remove generated file on clean.
/trunk/Makefile.in |    2     2     0     0 ++
 1 file changed, 2 insertions(+)
2009-01-27 19:53:44 +00:00
Yann E. MORIN"
6912bc6a2c Finally used the discovered paths from ./configure in scripts/crosstool-NG.sh:
- fix Makefile to really, really not used built-in rules and variables
- have scripts/crosstool-NG.sh generated from scripts/crosstool-NG.sh.in
- create a bin-overide directory ( in ${CT_WORK_DIR}/bin ) that contains shell wrappers to the actual discovered tools

 /trunk/scripts/crosstool-NG.sh.in |   27    23     4     0 +++++++++++++++++++++---
 /trunk/Makefile.in                |   50    48     2     0 +++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 71 insertions(+), 6 deletions(-)
2009-01-26 22:43:08 +00:00
Yann E. MORIN"
44596c425f Makefile.in: remove generated paths.mk during clean
/trunk/Makefile.in |    2     2     0     0 ++
 1 file changed, 2 insertions(+)
2009-01-25 22:59:55 +00:00