tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sets, subsets, syspkgs, and MK*

> >   MK*: controls building/installing some group of programs/files
> > 
> >   USE*: controls whether other programs will try to use a feature
> Indeed -- that should be _quite_ clear from share/mk/bsd.README.

Someone said something different than you about USE_*.  He also said it's
quite clear. :)

I never think bsd.README is quite clear.  No one has clearly explain who can
COPTS and who uses it.  += is just hiding inconsistencies.  Anyway...

> I'm not sure though what "I think we should concentrate these knowledges
> into a single place" means.
> Normally the settings for these controls are all combined into a single
> place, i.e. the mk.conf file used for the build.  That's "one" place.
> The default settings are, IIUC, all in share/mk/* files, and that's also
> effectively "one" place too, though not one file.

Problems I've seen:
        - ${DESTDIR} has no info left how it's built
        - If you use want to know those variables, you have to call make.
          See distrib/sets/sets.subr calling make to get MK* and other vars.
          (Call make, print vars, then eval.)
        - To compile .c programs, statically defined *.h is preffered to
          -DXXX written in makefiles.  What if you change the makefile?
          You can add dependency of (*.c: Makefile), but it's inaccurate.

> The _use_ of these controls cannot be collected into one single place --
> they necessarily control building and use of features that are spread
> out throughout the source tree.

I meant variables that controlls partial builds.  It's only set of SUBDIRs.
You can do like:

        .include "netbsd_config.h"
        .include <>


Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index