Commit Graph

107 Commits

Author SHA1 Message Date
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
f52aecf43b Fix make clean/mrproper
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-28 21:26:28 -07:00
Alexey Neyman
c2ce5a21a1 Fix for missing DESTDIR
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-28 21:14:24 -07:00
Alexey Neyman
f4c94242d4 Avoid installing configure.in.in
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 23:35:05 -07:00
Alexey Neyman
2c0fb22641 Generate config/configure.in directly
from configure rather than substitute it from Makefile. Eventually we
might want to get rid of configure.in completely, doing on-the-fly
checks at the time of `ct-ng build`, but that is left for another day.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 12:28:50 -07:00
Alexey Neyman
6f5afbdf82 Allow 'make V=1' to see the commands.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 11:55:19 -07:00
Alexey Neyman
de4433298a Add a release creation script
One TBD left is the signing of the tarballs.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-21 14:04:12 -07:00
Alexey Neyman
3906acc007 Move some scripts to a new directory, maintainer
... which are not of much interest to the end user.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-21 14:03:31 -07:00
Alexey Neyman
55c9c7f058 Hot fix for 'make install'
... while I continue to work on release script.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-20 22:25:44 -07:00
Dan McGregor
6d1bcaa2f5 Use configure to find the processor count
configure.ac now finds how to count the CPUs in a system. Currently
the getconf method and sysctl methods are supported. Adding more is
easy enough.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-01 22:22:13 -06:00
Alexey Neyman
2dae1cf816 Require GNU sed
After much struggling with macos (BSD) sed and even getting everything
work in crosstool-ng itself, I had to abandon that because some
components rely on GNU syntax. Specifically, GNU libc uses '/.../{H;g}'
(note absense of the separator after 'g').

So, revert the -r/-E detection and check for sed's being of GNU origin.
MacOS people, sorry, but you'd have to install GNU sed.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-26 20:42:32 -08:00
Alexey Neyman
59bab98b2d Revert "Determine whether -E/-r option selects extended regexp"
This reverts commit 7bcf18bfab.
2017-02-26 19:06:35 -08:00
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