source: trunk/ash/Makefile.kmk@ 3313

Last change on this file since 3313 was 3229, checked in by bird, 18 years ago

PC_SLASHES

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