| [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 |  | 
|---|
|  | 9 | PROGRAMS = ash | 
|---|
| [2484] | 10 | INSTALLS = ash.man | 
|---|
| [2475] | 11 |  | 
|---|
|  | 12 | ash_TEMPLATE = bin | 
|---|
| [3042] | 13 | ash_INST = bin/ash$(SUFF_EXE) bin/sh$(SUFF_EXE) | 
|---|
| [2475] | 14 | ash_DEFS = lint SHELL SMALL | 
|---|
|  | 15 | ash_DEFS.os2 = EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS | 
|---|
|  | 16 | ash_INCS = $(PATH_TARGET) . # (the last is because of error.h) | 
|---|
|  | 17 | ash_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 | 
|---|
|  | 48 | ash_DEPS = \ | 
|---|
|  | 49 | $(PATH_TARGET)/arith.h \ | 
|---|
|  | 50 | $(PATH_TARGET)/builtins.h \ | 
|---|
|  | 51 | $(PATH_TARGET)/nodes.h \ | 
|---|
|  | 52 | $(PATH_TARGET)/token.h | 
|---|
| [2484] | 53 | ash_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] | 61 | ash.man_TEMPLATE = usr.bin.man | 
|---|
|  | 62 | ash.man_SOURCES = \ | 
|---|
|  | 63 | sh.1=>ash.1 | 
|---|
|  | 64 | #ash.man_SYMLINKS = \ | 
|---|
|  | 65 | #       ash.1.gz=>sh.1 | 
|---|
| [2475] | 66 |  | 
|---|
| [2484] | 67 | DEPTH = .. | 
|---|
| [2475] | 68 | include $(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 |  | 
|---|