Ignore:
Timestamp:
Nov 26, 2006, 12:47:02 PM (19 years ago)
Author:
bird
Message:

porting in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ash/Makefile.kmk

    r626 r629  
    22## @file
    33#
    4 # kBuild Makefile for ash.
     4# kBuild Makefile for kmk_ash.
    55#
    6 # Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
     6# Copyright (c) 2005-2006 knut st. osmundsen <bird-src-spam@anduin.net>
    77#
    88
    9 PROGRAMS = ash
    10 INSTALLS = ash.man
     9DEPTH = ../..
     10include $(PATH_KBUILD)/header.kmk
    1111
    12 ash_TEMPLATE = bin
    13 ash_DEFS = lint SHELL SMALL
    14 ash_DEFS.os2 = EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS
    15 ash_INCS = $(PATH_TARGET) . # (the last is because of error.h)
    16 ash_SOURCES = \
     12#INSTALLS = ash.man
     13
     14PROGRAMS += kmk_ash
     15kmk_ash_TEMPLATE = BIN
     16kmk_ash_DEFS = lint SHELL SMALL
     17kmk_ash_DEFS.win = PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS
     18kmk_ash_DEFS.os2 = EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS
     19kmk_ash_INCS = $(PATH_TARGET) . # (the last is because of error.h)
     20kmk_ash_SOURCES = \
    1721        alias.c \
    1822        cd.c \
     
    4549        $(PATH_TARGET)/init.c \
    4650        $(PATH_TARGET)/nodes.c
    47 ash_DEPS = \
     51kmk_ash_DEPS = \
    4852        $(PATH_TARGET)/arith.h \
    4953        $(PATH_TARGET)/builtins.h \
    5054        $(PATH_TARGET)/nodes.h \
    5155        $(PATH_TARGET)/token.h
    52 ash_CLEAN = \
    53         $(ash_DEPS)     \
     56kmk_ash_CLEAN = \
     57        $(kmk_ash_DEPS) \
    5458        $(PATH_TARGET)/arith.c \
    5559        $(PATH_TARGET)/arith_lex.c \
     
    5862        $(PATH_TARGET)/nodes.c
    5963
    60 ash.man_TEMPLATE = usr.bin.man
    61 ash.man_SOURCES = \
     64kmk_ash.man_TEMPLATE = usr.bin.man
     65kmk_ash.man_SOURCES = \
    6266        sh.1=>ash.1
    6367#ash.man_SYMLINKS = \
    6468#       ash.1.gz=>sh.1
    6569
    66 DEPTH = ..
    67 include $(PATH_KBUILD)/rules.kmk
     70include $(PATH_KBUILD)/footer.kmk
     71
     72#
     73# ATTENTION! ATTENTION! ATTENTION!
     74#
     75# Older ash versions has trouble with some of these scripts, great.
     76# Kudos to the NetBSD guys for this clever move. ;)
     77#
     78# So, when building for the frist time, setting BOOSTRAP_SHELL=/bin/bash is good idea.
     79#
     80BOOTSTRAP_SHELL ?= $(SHELL)
    6881
    6982$(PATH_TARGET)/arith.h $(PATH_TARGET)/arith.c: arith.y | $(call DIRDEP,$(PATH_TARGET))
     
    7588        flex -8 -o$@ $^                     # 8-bit lex scanner for arithmetic
    7689
    77 $(PATH_TARGET)/builtins.h $(PATH_TARGET)/builtins.c: mkbuiltins shell.h builtins.def | $(call DIRDEP,$(PATH_TARGET))
    78         $+ $(dir $@)
     90$(PATH_TARGET)/builtins.h $(PATH_TARGET)/builtins.c: $(PATH_CURRENT)/mkbuiltins shell.h builtins.def | $(call DIRDEP,$(PATH_TARGET))
     91        $(BOOTSTRAP_SHELL) $+ $(dir $@)
    7992        [ -f $(PATH_TARGET)/builtins.h ]
    8093
    81 $(PATH_TARGET)/nodes.h $(PATH_TARGET)/nodes.c: mknodes.sh nodetypes nodes.c.pat | $(call DIRDEP,$(PATH_TARGET))
    82         $+ $(dir $@)
     94$(PATH_TARGET)/nodes.h $(PATH_TARGET)/nodes.c: $(PATH_CURRENT)/mknodes.sh nodetypes nodes.c.pat | $(call DIRDEP,$(PATH_TARGET))
     95        $(BOOTSTRAP_SHELL) $+ $(dir $@)
    8396        [ -f $(dir $@)/nodes.h ]
    8497
    85 $(PATH_TARGET)/token.h: mktokens | $(call DIRDEP,$(PATH_TARGET))
    86         $+
     98$(PATH_TARGET)/token.h: $(PATH_CURRENT)/mktokens | $(call DIRDEP,$(PATH_TARGET))
     99        $(BOOTSTRAP_SHELL) $+
    87100        $(MV) token.h $@
    88101
    89 $(PATH_TARGET)/init.c: mkinit.sh $(filter-out $(PATH_TARGET)/%,$(ash_SOURCES)) | $(call DIRDEP,$(PATH_TARGET))
    90         $+
     102$(PATH_TARGET)/init.c: $(PATH_CURRENT)/mkinit.sh $(filter-out $(PATH_TARGET)/%,$(kmk_ash_SOURCES)) | $(call DIRDEP,$(PATH_TARGET))
     103        $(BOOTSTRAP_SHELL) $+
    91104        $(MV) init.c $@
    92105
Note: See TracChangeset for help on using the changeset viewer.