- Timestamp:
- Nov 26, 2006, 12:47:02 PM (19 years ago)
- Location:
- trunk/src/ash
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/Makefile.kmk
r626 r629 2 2 ## @file 3 3 # 4 # kBuild Makefile for ash.4 # kBuild Makefile for kmk_ash. 5 5 # 6 # Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>6 # Copyright (c) 2005-2006 knut st. osmundsen <bird-src-spam@anduin.net> 7 7 # 8 8 9 PROGRAMS = ash 10 INSTALLS = ash.man 9 DEPTH = ../.. 10 include $(PATH_KBUILD)/header.kmk 11 11 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 14 PROGRAMS += kmk_ash 15 kmk_ash_TEMPLATE = BIN 16 kmk_ash_DEFS = lint SHELL SMALL 17 kmk_ash_DEFS.win = PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS 18 kmk_ash_DEFS.os2 = EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS 19 kmk_ash_INCS = $(PATH_TARGET) . # (the last is because of error.h) 20 kmk_ash_SOURCES = \ 17 21 alias.c \ 18 22 cd.c \ … … 45 49 $(PATH_TARGET)/init.c \ 46 50 $(PATH_TARGET)/nodes.c 47 ash_DEPS = \51 kmk_ash_DEPS = \ 48 52 $(PATH_TARGET)/arith.h \ 49 53 $(PATH_TARGET)/builtins.h \ 50 54 $(PATH_TARGET)/nodes.h \ 51 55 $(PATH_TARGET)/token.h 52 ash_CLEAN = \53 $( ash_DEPS) \56 kmk_ash_CLEAN = \ 57 $(kmk_ash_DEPS) \ 54 58 $(PATH_TARGET)/arith.c \ 55 59 $(PATH_TARGET)/arith_lex.c \ … … 58 62 $(PATH_TARGET)/nodes.c 59 63 60 ash.man_TEMPLATE = usr.bin.man61 ash.man_SOURCES = \64 kmk_ash.man_TEMPLATE = usr.bin.man 65 kmk_ash.man_SOURCES = \ 62 66 sh.1=>ash.1 63 67 #ash.man_SYMLINKS = \ 64 68 # ash.1.gz=>sh.1 65 69 66 DEPTH = .. 67 include $(PATH_KBUILD)/rules.kmk 70 include $(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 # 80 BOOTSTRAP_SHELL ?= $(SHELL) 68 81 69 82 $(PATH_TARGET)/arith.h $(PATH_TARGET)/arith.c: arith.y | $(call DIRDEP,$(PATH_TARGET)) … … 75 88 flex -8 -o$@ $^ # 8-bit lex scanner for arithmetic 76 89 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 $@) 79 92 [ -f $(PATH_TARGET)/builtins.h ] 80 93 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 $@) 83 96 [ -f $(dir $@)/nodes.h ] 84 97 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) $+ 87 100 $(MV) token.h $@ 88 101 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) $+ 91 104 $(MV) init.c $@ 92 105 -
trunk/src/ash/error.h
r626 r629 112 112 */ 113 113 114 #if defined(BSD) && !defined(__SVR4) 114 #if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) 115 115 #define setjmp(jmploc) _setjmp(jmploc) 116 116 #define longjmp(jmploc, val) _longjmp(jmploc, val) -
trunk/src/ash/eval.c
r626 r629 51 51 #include <sys/types.h> 52 52 #include <sys/wait.h> 53 #ifdef HAVE_SYSCTL_H 53 54 #include <sys/sysctl.h> 55 #endif 54 56 55 57 /* … … 604 606 syspath(void) 605 607 { 608 #ifdef CTL_USER 606 609 static char *sys_path = NULL; 607 610 static int mib[] = {CTL_USER, USER_CS_PATH}; 611 #endif 608 612 #ifdef PC_PATH_SEP 609 613 static char def_path[] = "PATH=/usr/bin;/bin;/usr/sbin;/sbin"; … … 611 615 static char def_path[] = "PATH=/usr/bin:/bin:/usr/sbin:/sbin"; 612 616 #endif 617 #ifdef CTL_USER 613 618 size_t len; 614 619 … … 625 630 } 626 631 return sys_path; 632 #else 633 return def_path; 634 #endif 627 635 } 628 636 … … 1009 1017 optptr = NULL; 1010 1018 /* and getopt */ 1019 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__) 1011 1020 optreset = 1; 1012 1021 optind = 1; 1022 #else 1023 optind = 0; /* init */ 1024 #endif 1025 1013 1026 exitstatus = cmdentry.u.bltin(argc, argv); 1014 1027 } else { -
trunk/src/ash/mkbuiltins
-
Property svn:executable
set to
*
-
Property svn:executable
set to
-
trunk/src/ash/mkinit.sh
-
Property svn:executable
set to
*
-
Property svn:executable
set to
-
trunk/src/ash/mknodes.sh
-
Property svn:executable
set to
*
-
Property svn:executable
set to
-
trunk/src/ash/mktokens
-
Property svn:executable
set to
*
r626 r629 38 38 # error messages. 39 39 40 if [ -z "$TMPDIR" ]; then 41 TMPDIR="/tmp" 42 export TMPDIR 43 fi 40 44 F="$TMPDIR/ka$$" 41 45 echo $F -
Property svn:executable
set to
-
trunk/src/ash/nodetypes
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
Note:
See TracChangeset
for help on using the changeset viewer.