Commit Graph

7 Commits

Author SHA1 Message Date
Michael Shigorin
c293dd141c lib/functions.mk: tiny but important note
There's a particular problem with lazy evaluation
in case of BOOT_LANG: mkimage uses internal variable,
BOOT_LANG = $(GLOBAL_BOOT_LANG) (note the lack of
immediate assignment there), and if we set up

  export GLOBAL_BOOT_LANG = $(BOOT_LANG)

in the same namespace we end up with recursively
defined pair of variables; a ":=" in either place
would save the day _but_ it's not there in m-p due to
accumulator variables, e.g. USERS, which are defined
and exported by a corresponding feature and then get
populated *after* having been declared for export,
_and_ it's not in mkimage as of 0.2.16 for some reason
that might even be good (I don't know yet).
2014-11-14 15:07:09 +03:00
Michael Shigorin
a3ddce7a81 functions.mk: allow setting to an empty value
set() is a function of two variables but the and()
check for *both* is incorrect as one might need to
override a previously set variable with empty string;
this has manifested itself with a case like this:

  @$(call set,ROOTPW_EMPTY,1)
  # ...
  @$(call set,ROOTPW_EMPTY,)
2014-09-19 21:01:08 +04:00
Michael Shigorin
e36792ac90 lib/functions.mk: initial xport()
A few too many downstream makefiles employed the pattern
of "export GLOBAL_VAR := $(VAR)"; macroize that.
2012-07-02 16:14:34 +03:00
Michael Shigorin
665c70a444 use PATH instead of hardwired pathlets
bin/ prefix tried to become a permatemp(tm).  No way.
2012-04-07 15:45:40 +03:00
Michael Shigorin
96e89d0062 s/subst/sed -i/g
Initial openSUSE package base taming effort has shown that
relatively few things should be fixed; subst has been generalized
as -i option to sed(1) since its introduction, so let's just fix it.
2011-12-26 18:21:22 +02:00
Michael Shigorin
9cedefdba9 introduced add_feature function
The features might get copy-pasted (or even copied-and-pruned)
when initialized; there's an unneccessary duplication of the
function name in the line adding it to FEATURES list, thus
prone to being forgotten and causing some havoc later on.

It was wrong in the first place but tackling this with some
double-colon rules ran into terminality issues, and further
tortures were considered unneccessary.

The current solution isn't perfect (no completely transparent
function name registration upon corresponding target being called)
but at least it is an improvement...
2011-11-19 11:47:29 +02:00
Michael Shigorin
d5a5941f96 official {distro,ve}/* support
This is quite a large-scale change since mkimage-profiles got used to
baking distributions over the last year, and virtual environments are
quite different, so e.g. image.in/Makefile had to be split in two with
the main part of it moved into features.in/iso/lib/.

Short overview:

- features.in/Makefile: lib/ support
  (supporting VE images requires dynamic modifications
  to image.in/Makefile before starting the build;
  the most natural way to achieve that seems to use
  features mechanism along with makefile include dir)

- packaging format related part moved into features.in/pack
  (should be better prepared for diversity either)
- features.in/iso renamed to features.in/build-distro
- features.in/ve  renamed to features.in/build-ve
  + NB: these could not be merged as e.g. features.in/build
    due to completely different script hooks

- lib/image.mk renamed to lib/build.mk
- image, config, log postprocessing moved downstream
- added a sort of a topping in the form of lib/sugar.mk
- assorted style fixups (like ifeq usage)

- clean.mk: reliability fix (the problem was observed by Oleg Ivanov
  and me too but finally it did get the attention quantum)

- reviewed, updated and extended docs
  + QUICKSTART: should be[come] a step-by-step guide
    (thanks Leo-sp50 for prodiving feedback)
2011-11-04 16:54:41 +02:00