Commit Graph

109 Commits

Author SHA1 Message Date
Christophe de Dinechin 0e8c83820b Add support for shared-library versioning 2018-06-14 17:39:09 +02:00
Christophe de Dinechin 46ff3609e1 Make it possible to run the tests from local MIQ 2018-05-17 15:50:41 +02:00
Christophe de Dinechin b49f74f58b Fix the execution of tests 2018-05-17 14:30:36 +02:00
Christophe de Dinechin 261186169a Make sure we create the output directory when building, fixes #1
Reported-by: Jochen Becher <jochen_becher@gmx.de>
2018-05-17 14:30:36 +02:00
Christophe de Dinechin 7a7040ceff Do not generate a variant when building a library 2018-05-15 16:33:11 +02:00
Christophe de Dinechin 3edf56abd4 Write 'Error' in a way that our 'Error:' grep does not find it
Otherwise, the error reporting at end of build erroneously reports a number
of errors by scanning the build log.
2018-05-14 16:21:23 +02:00
Christophe de Dinechin 0dd26e708d Do not disable printing directories by default 2018-05-14 16:14:19 +02:00
Christophe de Dinechin 044d38528c Ensure that we print where we build before configuring 2018-05-09 11:36:20 +02:00
Christophe de Dinechin fd9c4a2afb Fix order-only so that it does not introduce hard dependencies
With pre-3.80 make, the rules would introduce hard dependencies
instead of order-only dependencies, leading to a complete rebuild
of everything with every 'make'
2018-05-09 11:36:06 +02:00
Christophe de Dinechin 77b5010339 Pass MIQ variable to children make 2018-05-09 11:35:38 +02:00
Christophe de Dinechin 65c65d32dd Add HEADERS variable 2018-04-12 13:17:21 +02:00
Christophe de Dinechin fc6eb82353 Remove extraneous trailing / in include path 2018-04-12 12:39:36 +02:00
Christophe de Dinechin 0ae490d5fd Add results from pkg-config to config.h 2018-04-12 12:39:36 +02:00
Christophe de Dinechin 87ba839cdd Simplify rules for the dependencies 2018-04-10 18:56:25 +02:00
Christophe de Dinechin 0ab021d64b A better way to run tests 2018-04-10 18:42:35 +02:00
Christophe de Dinechin b678656455 Add support for generating pkg-config files 2018-04-10 18:37:37 +02:00
Christophe de Dinechin 2bcd0c9bcf Makefile rules refactoring - MIQ namespace + solidity
A number of changes in this commit:

1. Variable namespace cleanup:
   Rename non-configurable variables as MIQ_XYZ.

2. Internal target namespace cleanup
   Rename intermediate targets to begin with a dot (.)
   For example .build, .prebuild, etc.
   This impacts makefiles that hook for example to prebuild
   (now they need to hook to the .prebuild target)

3. Target, variant and build-environment variables names
   For example, dependencies on $(TARGET) moved from DEFINES_xyz
   to DEFINES_TARGET_xyz instead of DEFINES_xyz, and same thing
   for includes, sources, etc.

4. Protection of special user-level top-level targets
   A target like log-% no longer interferes with a file name such
   as log-file.c

5. Better support for multiple products
   When building foo.exe and bar.lib, there can be different
   sources for each project, i.e. $(SOURCES_foo) and $(SOURCES_bar).
2018-04-10 18:37:27 +02:00
Christophe de Dinechin 6fb78fe4ed Remove empty line 2018-04-04 12:15:54 +02:00
Christophe de Dinechin e0de7fd034 Install configuration sources
The configuration sources are installed in /usr[/local]/lib/make-it-quick
The config.local-setup.mk contains installation-dependent setup.
2018-04-04 10:32:09 +02:00
Christophe de Dinechin 198ad6420d Change project name to 'Make-it-Quick', and make it installable
This simplifies the management of projects using make-it-quick by
putting the makefile include files in a shared location
(typically /usr/local/include/make-it-quick)
2018-04-04 10:32:09 +02:00
Christophe de Dinechin 4d77ac826f Copyright update for 2018 2018-04-04 10:31:11 +02:00
Christophe de Dinechin 2b7ddbe26f Add 'reformat' alias for 'clang-format' since I naturally typed it twice already 2018-04-04 10:31:11 +02:00
Christophe de Dinechin 9f78375264 Add clang-format rule to reformat source files 2018-04-04 10:31:11 +02:00
Christophe de Dinechin 0317d1ea97 Fix the colorize target 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 37f7dc4f9d Make sure that LDFLAGS are set when running configuration steps
This is necessary for example when specific flags are required to
find a library in a configuration rule, e.g. LDFLAGS=/some/path
2018-04-04 10:21:04 +02:00
Christophe de Dinechin 856fca299e Correctly generate pkg-config.mk when CONFIG=libX but no PKGCONFIGS 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 32982f98c6 When cleaning, also clean libraries 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 172dbe84d6 Make the build for libraries more robust in case of mis-spelling 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 502d12b9b6 Cleanup variants 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 472c390157 Put the /dev/null in $(CAT)
Also do not build library checks with $(CFG_CFLAGS), because they are
neither needed nor available at that point.
2018-04-04 10:21:04 +02:00
Christophe de Dinechin 547bc93ad3 Fix passing of libraries during test 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 3821686b85 Show variant information in [BEGIN] and [END] steps 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 96d1e61a61 Better install process 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 13ceb48407 Cleanup cleanup rules 2018-04-04 10:21:04 +02:00
Christophe de Dinechin c15ff77bf4 Allow paralllel builds for configuration steps (defer after variants resolved) 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 9da269b646 Disable configuration steps before actually building
This ensures that configuration steps are properly logged in make.log
2018-04-04 10:21:04 +02:00
Christophe de Dinechin 4eab5b04b5 Remove extra / in top level .mkdir 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 4cba1dc07f Avoid extra / after $(OUTPUT) 2018-04-04 10:21:04 +02:00
Christophe de Dinechin dc429be3b2 Avoid adding / in $(OBJDIR) 2018-04-04 10:21:04 +02:00
Christophe de Dinechin b6e7ccf05d Change location for build outputs to something more practical for daily use 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 8d0b734e70 Add TOP variable to indicate top-level directory
This makes the output file organization cleaner in case where the
'build' directory is not itself at the top-level.
2018-04-04 10:21:04 +02:00
Christophe de Dinechin 671883dbf1 pkg-config results must be in OBJDIR, not OBJROOT 2018-04-04 10:21:04 +02:00
Christophe de Dinechin cb6b38ad72 Extract link libraries from CONFIG libX entries 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 332be643c7 Put variants as part of configuration phase rather than libraries 2018-04-04 10:21:04 +02:00
Christophe de Dinechin a4398bbd79 Clarify order of targets in parallel builds 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 3d675e35fb Add support for optional pkg-config entries 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 24eff2112b Workaround a bug in GNU make when reloading generated makefiles
The problem was discovered testing parallel builds.
The configuration rules depend on generated pkg-config.mk files.
However, experimentally, variables set in these files are not
correctly reloaded in rules declared in other variables.

Specifically, $(CFLAGS_PKGCONFIG) was not re-expanded after being
modified, which led to configuration builds to lack the required
flags, causing false configuration step failures.

The flags are now explicitly listed using $(shell cat...), which
is a little bit more expensive during the configuration step, but
ensures that the flags are correctly seen. Note that at that stage,
the dependency ensures that all the files were built correctly.
2018-04-04 10:21:04 +02:00
Christophe de Dinechin cb38305bb6 Write targets for configuration steps in one stdout redirection, no append 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 263725113e Make sure configuration happens before pre-build 2018-04-04 10:21:04 +02:00
Christophe de Dinechin 798771a4dc Make file names for configuration-generated files more consistent 2018-04-04 10:21:04 +02:00