Changeset 2340 for trunk/kBuild/doc/QuickReference-kmk.txt
- Timestamp:
- Apr 18, 2009, 2:05:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/doc/QuickReference-kmk.txt
r2243 r2340 974 974 975 975 976 Recipes 977 ------- 978 979 A typical recipe takes one of the two following forms:: 980 981 targets : normal-prerequisites | order-only-prerequisites 982 command 983 ... 984 985 targets : normal-prerequisites | order-only-prerequisites ; command 986 command 987 ... 988 989 Specifying more than one file in the ``targets`` lists is the same as 990 repeating the recipe for each of the files. 991 992 Use ``+`` and ``+|`` in the list of ``targets`` to tell ``kmk`` that the 993 recipe has more than one output. [1]_ The files after a ``+`` will 994 always be remade, while the files after a ``+|`` don't have to be remade. 995 The latter is frequently employed to update files which prerequisites 996 change wihtout the output files necessarily changing. See also 997 ``kmk_cp --changed``. 998 999 1000 Double colon recipes 1001 1002 Double colon recipes are written with ``::`` instead of ``:`` and are 1003 handled differently from ordinary recipes if the target appears in more 1004 than one recipe. First, all the recipes must be of the double colon type. 1005 Second, the recipes are executed individually and may be omitted depending 1006 on the state of their prerequisites. Double colon recipes without any 1007 prerequisites will always be executed. 1008 1009 1010 Pattern rules 1011 1012 A couple of examples:: 1013 1014 %.o : %.c 1015 gcc -o $@ $< 1016 %.tab.c %.tab.h : %.y 1017 bison -d $< 1018 1019 The latter has two outputs. 1020 1021 976 1022 ----- 977 1023
Note:
See TracChangeset
for help on using the changeset viewer.