source: trunk/ash/Makefile.kmk@ 2483

Last change on this file since 2483 was 2481, checked in by bird, 20 years ago

...

File size: 1.9 KB
RevLine 
[2481]1# $Id: $
2## @file
3#
4# kBuild Makefile for ash.
5#
6# Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
7#
[2475]8
9PROGRAMS = ash
10
11ash_TEMPLATE = bin
12ash_DEFS = lint SHELL SMALL
13ash_DEFS.os2 = EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS
14ash_INCS = $(PATH_TARGET) . # (the last is because of error.h)
15ash_SOURCES = \
16 alias.c \
17 cd.c \
18 error.c \
19 eval.c \
20 exec.c \
21 expand.c \
22 histedit.c \
23 input.c \
24 jobs.c \
25 mail.c \
26 main.c \
27 memalloc.c \
28 miscbltin.c \
29 mystring.c \
30 options.c \
31 output.c \
32 parser.c \
33 redir.c \
34 show.c \
35 syntax.c \
36 trap.c \
37 var.c \
38 bltin/echo.c \
39 bltin/kill.c \
40 bltin/test.c \
41 $(PATH_TARGET)/arith.c \
42 $(PATH_TARGET)/arith_lex.c \
43 $(PATH_TARGET)/builtins.c \
44 $(PATH_TARGET)/init.c \
45 $(PATH_TARGET)/nodes.c
46ash_DEPS = \
47 $(PATH_TARGET)/arith.h \
48 $(PATH_TARGET)/builtins.h \
49 $(PATH_TARGET)/nodes.h \
50 $(PATH_TARGET)/token.h
51
52
53DEPTH = ..
54include $(PATH_KBUILD)/rules.kmk
55
[2481]56## @todo: Make kBuild use this now that '|' has been discovered.
[2475]57$(PATH_TARGET):
58 $(MKDIR) -p $@
59
60$(PATH_TARGET)/arith.h $(PATH_TARGET)/arith.c: arith.y | $(PATH_TARGET)
61 yacc -ld $^
62 $(MV) -f y.tab.c $(PATH_TARGET)/arith.c
63 $(MV) -f y.tab.h $(PATH_TARGET)/arith.h
64
65$(PATH_TARGET)/arith_lex.c: arith_lex.l | $(PATH_TARGET)
66 flex -8 -o$@ $^ # 8-bit lex scanner for arithmetic
67
68$(PATH_TARGET)/builtins.h $(PATH_TARGET)/builtins.c: mkbuiltins shell.h builtins.def | $(PATH_TARGET)
69 $+ $(dir $@)
70 [ -f $(PATH_TARGET)/builtins.h ]
71
72$(PATH_TARGET)/nodes.h $(PATH_TARGET)/nodes.c: mknodes.sh nodetypes nodes.c.pat | $(PATH_TARGET)
73 $+ $(dir $@)
74 [ -f $(dir $@)/nodes.h ]
75
76$(PATH_TARGET)/token.h: mktokens | $(PATH_TARGET)
77 $+
78 $(MV) token.h $@
79
80$(PATH_TARGET)/init.c: mkinit.sh $(filter-out $(PATH_TARGET)/%,$(ash_SOURCES)) | $(PATH_TARGET)
81 $+
82 $(MV) init.c $@
83
Note: See TracBrowser for help on using the repository browser.