source: trunk/kErr/Makefile.kmk@ 6

Last change on this file since 6 was 5, checked in by bird, 18 years ago

Fixed DEPTH now that we're no longer in the kLIBC repository.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.6 KB
Line 
1# $Id: Makefile.kmk 5 2008-02-03 20:56:09Z bird $
2## @file
3# kErr - The Status Code API, sub-makefile.
4#
5
6#
7# Copyright (c) 2007 knut st. osmundsen <bird-kStuff-spam@anduin.net>
8#
9# This file is part of kStuff.
10#
11# kStuff is free software; you can redistribute it and/or
12# modify it under the terms of the GNU Lesser General Public
13# License as published by the Free Software Foundation; either
14# version 2.1 of the License, or (at your option) any later version.
15#
16# kStuff is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19# Lesser General Public License for more details.
20#
21# You should have received a copy of the GNU Lesser General Public
22# License along with kStuff; if not, write to the Free Software
23# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24#
25#
26
27DEPTH ?= ..
28SUB_DEPTH = ..
29include $(PATH_KBUILD)/subheader.kmk
30
31#
32# kHlpBaseStatic
33#
34LIBRARIES += kErrStatic
35kErrStatic_TEMPLATE = kStuffLIB
36kErrStatic_SOURCES = \
37 kErrName.c
38
39kErrName.c_DEPS = $(PATH_TARGET)/kErrNameConsts.h
40kErrName.c_INCS = $(PATH_TARGET)
41
42#
43# Generate case statements for kErrName().
44#
45$(PATH_TARGET)/kErrNameConsts.h: $(PATH_SUB_ROOT)/include/k/kErrors.h $(MAKEFILE_CURRENT) | $(call DIRDEP,$(PATH_TARGET))
46 $(RM) -f $@
47 $(SED) \
48 -e '/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/!d' \
49 -e 's/^#define *\(K[A-Z_]*ERR_[^ ()]*\) .*$$/ERR_CONST(\1)/' \
50 -e '/K[A-Z_]*ERR_[A-Z0-9_]*BASE/d' \
51 -e '/K[A-Z_]*ERR_[A-Z0-9_]*END/d' \
52 $< > $@
53
54
55# Generate the rules
56include $(PATH_KBUILD)/subfooter.kmk
57
Note: See TracBrowser for help on using the repository browser.