Changeset 2345


Ignore:
Timestamp:
Apr 20, 2009, 1:47:42 AM (16 years ago)
Author:
bird
Message:

hacking property tables.

Location:
trunk/kBuild/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/doc/Makefile.kmk

    r2341 r2345  
     1DEPTH = ../..
     2include ../header.kmk
     3
    14TXTFILES = \
    25        QuickReference-kmk.txt \
     
    1518$(foreach name, $(basename $(TXTFILES)), $(eval $(genrule)))
    1619
     20
     21#
     22# For generating the basis for the target properties table.
     23#
     24my_tp.1 = BLDPROGS PROGRAMS
     25my_tp.2 = LIBRARIES
     26my_tp.3 = IMPORT_LIBS DLLS
     27my_tp.4 = DLLS
     28my_tp.5 = PROGRAMS
     29my_tp.6 = SYSMODS
     30my_tp.7 = MISCBINS
     31my_tp.8 = INSTALLS
     32my_tp.9 = FETCHES
     33my_tp.a = OTHERS
     34my_tp = 1 2 3 4 5 6 7 8 9 a
     35tpc := $(translate $(my_tp),$(SP))
     36
     37define def_target_prop_rule
     38target-properties::
     39        @$$(PRINTF) '|%-2s| %-18s| %-6s|%$(expr 79-33)s|\n' "$(kind)" "``$(prop)``" "$(my_tmp_which)" ""
     40        @$$(ECHO) '+--+-------------------+-------+----------------------------------------------+'
     41endef
     42define def_target_prop_doit
     43my_tmp_which := $(foreach x,$(my_tp),$(if $(intersects \
     44                     $(prop),\
     45                     $(foreach nm,$(my_tp.$(x)),$(foreach suff,SINGLE DEFERRED ACCUMULATE_R ACCUMULATE_L,$(PROPS_$(nm)_$(suff)))))\
     46                ,$(x),))
     47my_tmp_which := $(translate $(my_tmp_which),$(SP))
     48$(for local i = 1, $i < 10, local i := $(expr $i + 1),$(for local l = $(expr 10 - $i + 1), $l > 3, local l := $(expr $l - 1), \
     49        $(eval my_tmp_which:=$(subst $(substr $(tpc), $i, $l),$i-$(substr $(tpc),$(expr $i + $l - 1),1),$(my_tmp_which)))\
     50) )
     51$(eval $(def_target_prop_rule))
     52endef
     53kind := S
     54$(foreach prop,$(sort $(PROPS_SINGLE)),$(evalcall def_target_prop_doit))
     55kind := D
     56$(foreach prop,$(sort $(PROPS_DEFERRED)),$(evalcall def_target_prop_doit))
     57kind := Ar
     58$(foreach prop,$(sort $(PROPS_ACCUMULATE_R)),$(evalcall def_target_prop_doit))
     59kind := Al
     60$(foreach prop,$(sort $(PROPS_ACCUMULATE_L)),$(evalcall def_target_prop_doit))
     61#kind := To
     62#$(foreach prop,$(sort $(PROPS_TOOLS_ONLY)),$(evalcall def_target_prop_doit))
     63
  • trunk/kBuild/doc/QuickReference-kBuild.txt

    r2342 r2345  
    99--------------------------------
    1010
    11 A typical template::
     11A typical makefile::
    1212
    1313    # $Id$
    1414    ## @file
    15     # Makefile descriptions
    16     #
    17 
    18     #
    19     # Copyright (c) year
    20     # License and other legal stuff.
     15    # Makefile description.
     16    #
     17
     18    #
     19    # Copyright (c) year name
     20    # License, disclaimer and other legal text.
    2121    #
    2222
     
    2525
    2626    #
    27     # Global variables (optional).
     27    # Include sub-makefiles.
     28    #
     29    include $(PATH_CURRENT)/subdir1/Makefile.kmk
     30    include $(PATH_CURRENT)/subdir2/Makefile.kmk
     31
     32    #
     33    # Global variables.
    2834    #
    2935    MYPREFIX_SOMETHING = or another
     
    5864    include $(FILE_KBUILD_SUB_FOOTER)
    5965
    60     #
    61     # More optional rules.
    62     #
    63 
    64 That's it.
    65 
    6666
    6767Target lists
    6868------------
    6969
    70 The table gives the target lists in the typical pass order.
    71 
    72 +----------------------+-------------------------------------------------------+
    73 | Name                 | Description                                           |
    74 +======================+=======================================================+
    75 | ``BLDPROGS``         | Build programs, targets the host platform.            |
    76 +----------------------+-------------------------------------------------------+
    77 | ``LIBRARIES``        | Libraries (not shared).                               |
    78 +----------------------+-------------------------------------------------------+
    79 | ``IMPORT_LIBS``      | Import libraries or stub shared libraries.            |
    80 +----------------------+-------------------------------------------------------+
    81 | ``DLL``              | DLLs, Shared Libraries, DYLIBs, etc.                  |
    82 +----------------------+-------------------------------------------------------+
    83 | ``PROGRAMS``         | Executable programs.                                  |
    84 +----------------------+-------------------------------------------------------+
    85 | ``SYSMODS``          | System modules (kexts, kernel modules, drivers, etc). |
    86 +----------------------+-------------------------------------------------------+
    87 | ``MISCBINS``         | Miscellanceous binaries like BIOS images and such.    |
    88 +----------------------+-------------------------------------------------------+
    89 | ``OTHERS``           | List of targets made during the others pass.          |
    90 +----------------------+-------------------------------------------------------+
    91 | ``INSTALLS``         | Things to install. [1]_                               |
    92 +----------------------+-------------------------------------------------------+
    93 | ``FETCHES``          | Things to fetch. [1]_                                 |
    94 +----------------------+-------------------------------------------------------+
    95 
     70+-+-------------------+-------------------------------------------------------+
     71|#| Name              | Description                                           |
     72+=+===================+=======================================================+
     73|1| ``BLDPROGS``      | Build programs, targets the host platform.            |
     74+-+-------------------+-------------------------------------------------------+
     75|2| ``LIBRARIES``     | Libraries (not shared).                               |
     76+-+-------------------+-------------------------------------------------------+
     77|3| ``IMPORT_LIBS``   | Import libraries or stub shared libraries.            |
     78+-+-------------------+-------------------------------------------------------+
     79|4| ``DLLS``          | DLLs, Shared Libraries, DYLIBs, etc.                  |
     80+-+-------------------+-------------------------------------------------------+
     81|5| ``PROGRAMS``      | Executable programs.                                  |
     82+-+-------------------+-------------------------------------------------------+
     83|6| ``SYSMODS``       | System modules (kexts, kernel modules, drivers, etc). |
     84+-+-------------------+-------------------------------------------------------+
     85|7| ``MISCBINS``      | Miscellanceous binaries like BIOS images and such.    |
     86+-+-------------------+-------------------------------------------------------+
     87|8| ``INSTALLS``      | Things to install. [1]_                               |
     88+-+-------------------+-------------------------------------------------------+
     89|9| ``FETCHES``       | Things to fetch. [1]_                                 |
     90+-+-------------------+-------------------------------------------------------+
     91|a| ``OTHERS``        | List of targets made during the others pass.          |
     92+-+-------------------+-------------------------------------------------------+
     93
     94
     95Target properties
     96-----------------
     97
     98The first column indicates the kind of property, S=Single, D=Deferred,
     99Ar=Accumlate-Right and Al=Accumulate-Left.
     100
     101The third column should be cross referenced with the first column in the
     102target list table above.
     103
     104+--+-------------------+-------+----------------------------------------------+
     105|K | Name              | Which | Description                                  |
     106+==+===================+=======+==============================================+
     107|S | ``ARLIBSUFF``     | 2     |                                              |
     108+--+-------------------+-------+----------------------------------------------+
     109|S | ``ARTOOL``        | 2     |                                              |
     110+--+-------------------+-------+----------------------------------------------+
     111|S | ``ASOBJSUFF``     | 1-7   |                                              |
     112+--+-------------------+-------+----------------------------------------------+
     113|S | ``ASTOOL``        | 1-7   |                                              |
     114+--+-------------------+-------+----------------------------------------------+
     115|S | ``BINSUFF``       | 7     |                                              |
     116+--+-------------------+-------+----------------------------------------------+
     117|S | ``BLD_TRG``       | 1-7   |                                              |
     118+--+-------------------+-------+----------------------------------------------+
     119|S | ``BLD_TRG_ARCH``  | 1-7   |                                              |
     120+--+-------------------+-------+----------------------------------------------+
     121|S | ``BLD_TRG_CPU``   | 1-7   |                                              |
     122+--+-------------------+-------+----------------------------------------------+
     123|S | ``BLD_TYPE``      | 1-7   |                                              |
     124+--+-------------------+-------+----------------------------------------------+
     125|S | ``COBJSUFF``      | 1-7   |                                              |
     126+--+-------------------+-------+----------------------------------------------+
     127|S | ``CTOOL``         | 1-7   |                                              |
     128+--+-------------------+-------+----------------------------------------------+
     129|S | ``CXXOBJSUFF``    | 1-7   |                                              |
     130+--+-------------------+-------+----------------------------------------------+
     131|S | ``CXXTOOL``       | 1-7   |                                              |
     132+--+-------------------+-------+----------------------------------------------+
     133|S | ``DLLSUFF``       | 34    |                                              |
     134+--+-------------------+-------+----------------------------------------------+
     135|S | ``EXESUFF``       | 15    |                                              |
     136+--+-------------------+-------+----------------------------------------------+
     137|S | ``FETCHDIR``      | 9     |                                              |
     138+--+-------------------+-------+----------------------------------------------+
     139|S | ``FETCHTOOL``     | 9     |                                              |
     140+--+-------------------+-------+----------------------------------------------+
     141|S | ``GID``           | 1-7   |                                              |
     142+--+-------------------+-------+----------------------------------------------+
     143|S | ``INST``          | 1-9   |                                              |
     144+--+-------------------+-------+----------------------------------------------+
     145|S | ``LDTOOL``        | 13-7  |                                              |
     146+--+-------------------+-------+----------------------------------------------+
     147|S | ``LIBSUFF``       | 234   |                                              |
     148+--+-------------------+-------+----------------------------------------------+
     149|S | ``MODE``          | 1-7   |                                              |
     150+--+-------------------+-------+----------------------------------------------+
     151|S | ``NOINST``        | 1-8   |                                              |
     152+--+-------------------+-------+----------------------------------------------+
     153|S | ``OBJCOBJSUFF``   | 1-7   |                                              |
     154+--+-------------------+-------+----------------------------------------------+
     155|S | ``OBJCTOOL``      | 1-7   |                                              |
     156+--+-------------------+-------+----------------------------------------------+
     157|S | ``OBJSUFF``       | 1-7   |                                              |
     158+--+-------------------+-------+----------------------------------------------+
     159|S | ``PATCHTOOL``     | 9     |                                              |
     160+--+-------------------+-------+----------------------------------------------+
     161|S | ``RCOBJSUFF``     | 1-7   |                                              |
     162+--+-------------------+-------+----------------------------------------------+
     163|S | ``RCTOOL``        | 1-7   |                                              |
     164+--+-------------------+-------+----------------------------------------------+
     165|S | ``SYSSUFF``       | 6     |                                              |
     166+--+-------------------+-------+----------------------------------------------+
     167|S | ``TEMPLATE``      | 1-9   |                                              |
     168+--+-------------------+-------+----------------------------------------------+
     169|S | ``TOOL``          | 1-9   |                                              |
     170+--+-------------------+-------+----------------------------------------------+
     171|S | ``UID``           | 1-7   |                                              |
     172+--+-------------------+-------+----------------------------------------------+
     173|S | ``UNPACKTOOL``    | 9     |                                              |
     174+--+-------------------+-------+----------------------------------------------+
     175|D | ``INSTALLER``     | 1-8   |                                              |
     176+--+-------------------+-------+----------------------------------------------+
     177|D | ``INSTFUN``       | 1-8   |                                              |
     178+--+-------------------+-------+----------------------------------------------+
     179|D | ``NAME``          | 1-7   |                                              |
     180+--+-------------------+-------+----------------------------------------------+
     181|D | ``POST_CMDS``     | 1-7   |                                              |
     182+--+-------------------+-------+----------------------------------------------+
     183|D | ``PRE_CMDS``      | 1-7   |                                              |
     184+--+-------------------+-------+----------------------------------------------+
     185|D | ``SONAME``        | 13-7  |                                              |
     186+--+-------------------+-------+----------------------------------------------+
     187|Ar| ``ARFLAGS``       | 2     |                                              |
     188+--+-------------------+-------+----------------------------------------------+
     189|Ar| ``ASDEFS``        | 1-7   |                                              |
     190+--+-------------------+-------+----------------------------------------------+
     191|Ar| ``ASFLAGS``       | 1-7   |                                              |
     192+--+-------------------+-------+----------------------------------------------+
     193|Ar| ``CDEFS``         | 1-7   |                                              |
     194+--+-------------------+-------+----------------------------------------------+
     195|Ar| ``CFLAGS``        | 1-7   |                                              |
     196+--+-------------------+-------+----------------------------------------------+
     197|Ar| ``CXXDEFS``       | 1-7   |                                              |
     198+--+-------------------+-------+----------------------------------------------+
     199|Ar| ``CXXFLAGS``      | 1-7   |                                              |
     200+--+-------------------+-------+----------------------------------------------+
     201|Ar| ``DEFS``          | 1-7   |                                              |
     202+--+-------------------+-------+----------------------------------------------+
     203|Ar| ``DEPS``          | 1-8   |                                              |
     204+--+-------------------+-------+----------------------------------------------+
     205|Ar| ``FETCHFLAGS``    | 9     |                                              |
     206+--+-------------------+-------+----------------------------------------------+
     207|Ar| ``IDFLAGS``       | 1-7   |                                              |
     208+--+-------------------+-------+----------------------------------------------+
     209|Ar| ``IFDLAGS``       | 1-7   |                                              |
     210+--+-------------------+-------+----------------------------------------------+
     211|Ar| ``ISFLAGS``       | 1-7   |                                              |
     212+--+-------------------+-------+----------------------------------------------+
     213|Ar| ``LDFLAGS``       | 13-7  |                                              |
     214+--+-------------------+-------+----------------------------------------------+
     215|Ar| ``LNK_DEPS``      | 1-7   |                                              |
     216+--+-------------------+-------+----------------------------------------------+
     217|Ar| ``LNK_ORDERDEPS`` | 1-7   |                                              |
     218+--+-------------------+-------+----------------------------------------------+
     219|Ar| ``OBJCDEFS``      | 1-7   |                                              |
     220+--+-------------------+-------+----------------------------------------------+
     221|Ar| ``OBJCFLAGS``     | 1-7   |                                              |
     222+--+-------------------+-------+----------------------------------------------+
     223|Ar| ``ORDERDEPS``     | 1-8   |                                              |
     224+--+-------------------+-------+----------------------------------------------+
     225|Ar| ``PATCHFLAGS``    | 9     |                                              |
     226+--+-------------------+-------+----------------------------------------------+
     227|Ar| ``RCDEFS``        | 1-7   |                                              |
     228+--+-------------------+-------+----------------------------------------------+
     229|Ar| ``RCFLAGS``       | 1-7   |                                              |
     230+--+-------------------+-------+----------------------------------------------+
     231|Ar| ``UNPACKFLAGS``   | 9     |                                              |
     232+--+-------------------+-------+----------------------------------------------+
     233|Al| ``ASINCS``        | 1-7   |                                              |
     234+--+-------------------+-------+----------------------------------------------+
     235|Al| ``BLDDIRS``       | 1-7   |                                              |
     236+--+-------------------+-------+----------------------------------------------+
     237|Al| ``CINCS``         | 1-7   |                                              |
     238+--+-------------------+-------+----------------------------------------------+
     239|Al| ``CLEAN``         | 1-9   |                                              |
     240+--+-------------------+-------+----------------------------------------------+
     241|Al| ``CXXINCS``       | 1-7   |                                              |
     242+--+-------------------+-------+----------------------------------------------+
     243|Al| ``DIRS``          | 8     |                                              |
     244+--+-------------------+-------+----------------------------------------------+
     245|Al| ``INCS``          | 1-7   |                                              |
     246+--+-------------------+-------+----------------------------------------------+
     247|Al| ``INTERMEDIATES`` | 1-7   |                                              |
     248+--+-------------------+-------+----------------------------------------------+
     249|Al| ``LIBPATH``       | 13-7  |                                              |
     250+--+-------------------+-------+----------------------------------------------+
     251|Al| ``LIBS``          | 13-7  |                                              |
     252+--+-------------------+-------+----------------------------------------------+
     253|Al| ``OBJCINCS``      | 1-7   |                                              |
     254+--+-------------------+-------+----------------------------------------------+
     255|Al| ``RCINCS``        | 1-7   |                                              |
     256+--+-------------------+-------+----------------------------------------------+
     257|Al| ``SDKS``          | 1-7   |                                              |
     258+--+-------------------+-------+----------------------------------------------+
     259|Al| ``SOURCES``       | 1-9   |                                              |
     260+--+-------------------+-------+----------------------------------------------+
     261|Al| ``SRC_HANDLERS``  | 1-7   |                                              |
     262+--+-------------------+-------+----------------------------------------------+
     263|Al| ``USES``          | 1-7   |                                              |
     264+--+-------------------+-------+----------------------------------------------+
    96265
    97266
     
    105274:Copyright: Copyright (c) 2009 knut st. osmundsen
    106275
     276
Note: See TracChangeset for help on using the changeset viewer.