source: trunk/ash/Makefile.kmk@ 2562

Last change on this file since 2562 was 2491, checked in by bird, 20 years ago

Corrected directory deps.

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