VirtualBox

Changeset 1101 in kBuild


Ignore:
Timestamp:
Sep 22, 2007 10:01:37 PM (17 years ago)
Author:
bird
Message:

Added md5sum as a builtin tool.

Location:
trunk/src/kmk
Files:
1 added
4 edited

Legend:

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

    r986 r1101  
    151151#
    152152kmk_DEFS += CONFIG_WITH_KMK_BUILTIN
     153kmk_LIBS += $(LIB_KUTIL)
    153154kmk_SOURCES += \
    154155        kmkbuiltin.c \
     
    159160        kmkbuiltin/echo.c \
    160161        kmkbuiltin/install.c \
     162        kmkbuiltin/md5sum.c \
    161163        kmkbuiltin/mkdir.c \
    162164        kmkbuiltin/mv.c \
     
    171173#
    172174## @todo should probably put all those
    173 PROGRAMS += kmk_append kmk_cat kmk_cp kmk_echo kmk_mkdir kmk_mv kmk_install kmk_ln kmk_printf kmk_rm kmk_rmdir
     175PROGRAMS += kmk_append kmk_cat kmk_cp kmk_echo kmk_md5sum kmk_mkdir kmk_mv kmk_install kmk_ln kmk_printf kmk_rm kmk_rmdir
    174176
    175177kmk_append_TEMPLATE = BIN-KMK
     
    209211kmk_mkdir_SOURCES = \
    210212        kmkbuiltin/mkdir.c
     213
     214kmk_md5sum_TEMPLATE = BIN-KMK
     215kmk_md5sum_DEFS = kmk_builtin_md5sum=main
     216kmk_md5sum_SOURCES = \
     217        kmkbuiltin/md5sum.c
     218kmk_md5sum_LIBS = $(LIB_KUTIL)
    211219
    212220kmk_mv_TEMPLATE = BIN-KMK
  • trunk/src/kmk/kmkbuiltin.c

    r803 r1101  
    203203        rc = kmk_builtin_rmdir(argc, argv, environ);
    204204    /* rarely used commands: */
     205    else if (!strcmp(pszCmd, "cp"))
     206        rc = kmk_builtin_cp(argc, argv, environ);
     207    else if (!strcmp(pszCmd, "md5sum"))
     208        rc = kmk_builtin_md5sum(argc, argv, environ);
    205209    else if (!strcmp(pszCmd, "cat"))
    206210        rc = kmk_builtin_cat(argc, argv, environ);
    207     else if (!strcmp(pszCmd, "cp"))
    208         rc = kmk_builtin_cp(argc, argv, environ);
    209211    else
    210212    {
  • trunk/src/kmk/kmkbuiltin.h

    r785 r1101  
    3434extern int kmk_builtin_install(int argc, char **argv, char **envp);
    3535extern int kmk_builtin_ln(int argc, char **argv, char **envp);
     36extern int kmk_builtin_md5sum(int argc, char **argv, char **envp);
    3637extern int kmk_builtin_mkdir(int argc, char **argv, char **envp);
    3738extern int kmk_builtin_mv(int argc, char **argv, char **envp);
  • trunk/src/kmk/variable.c

    r938 r1101  
    10901090#ifdef CONFIG_WITH_KMK_BUILTIN
    10911091  /* The supported kMk Builtin commands. */
    1092   (void) define_variable ("KMK_BUILTIN", 11, "append cat cp echo install ln mkdir mv printf rm rmdir", o_default, 0);
     1092  (void) define_variable ("KMK_BUILTIN", 11, "append cat cp echo install ln md5sum mkdir mv printf rm rmdir", o_default, 0);
    10931093#endif
    10941094
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette