VirtualBox

Changeset 53658 in vbox for trunk


Ignore:
Timestamp:
Jan 2, 2015 12:31:02 PM (10 years ago)
Author:
vboxsync
Message:

VBoxDTrace: Generated dt_names.c and dt_errtags.c. (r35)

Location:
trunk/src/VBox/ExtPacks/VBoxDTrace
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/VBoxDTrace/VBoxDTrace/Makefile.kmk

    r53657 r53658  
    7676        $(VBOXDT_PATH_LIBDTRACE)/common/dt_xlator.c \
    7777        \
     78        $(VBoxDTrace_0_OUTDIR)/dt_errtags.c \
     79        $(VBoxDTrace_0_OUTDIR)/dt_names.c \
     80        \
    7881        $(VBOXDT_PATH_CMN_CTF)/ctf_create.c \
    7982        $(VBOXDT_PATH_CMN_CTF)/ctf_error.c \
     
    110113 VBoxDTrace_INCS     += $(VBoxDTrace_0_OUTDIR)/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common
    111114else
    112  # fixme later
     115 # TODO: generate these.
    113116endif
    114117
    115118if 1
    116  USES                 = lex
    117  VBoxDTrace_USES      = lex
     119 USES                += lex
     120 VBoxDTrace_USES     += lex
    118121 VBoxDTrace_LEXTOOL   = FLEX
    119122 VBoxDTrace_LEXFLAGS  = -l
     
    122125        $(VBOXDT_PATH_LIBDTRACE)/common/dt_lex.l
    123126else
    124  VBoxDTrace_SOURCES  += \
    125         generated/dt_lex.c
    126  VBoxDTrace_INCS.win  += \
    127         generated/hdrhacks
     127 # TODO: generate this.
    128128endif
    129129
     
    131131        $(LIB_RUNTIME)
    132132
     133
     134# Generate sources
     135$$(VBoxDTrace_0_OUTDIR)/dt_errtags.c: \
     136                $(VBOXDT_PATH_LIBDTRACE)/common/dt_errtags.h \
     137                $(VBOXDT_PATH_LIBDTRACE)/common/mkerrtags.sed \
     138                | $$(dir $$@)
     139        $(MSG_GENERATE,VBoxDTrace,$@,$<)
     140        $(SED) -n -f $(VBOXDT_PATH_LIBDTRACE)/common/mkerrtags.sed --output $@ $<
     141
     142$$(VBoxDTrace_0_OUTDIR)/dt_names.c: \
     143                $(VBOXDT_PATH_UTS)/common/sys/dtrace.h \
     144                $(VBOXDT_PATH_LIBDTRACE)/common/mknames.sed \
     145                | $$(dir $$@)
     146        $(MSG_GENERATE,VBoxDTrace,$@,$<)
     147        $(SED) -n -f $(VBOXDT_PATH_LIBDTRACE)/common/mknames.sed --output $@ $<
     148
    133149include $(KBUILD_PATH)/subfooter.kmk
    134150
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/mkerrtags.sh

    r53634 r53658  
    1 #!/bin/sh
     1#!/usr/bin/env kmk_ash
    22#
    33# CDDL HEADER START
     
    2727#ident  "%Z%%M% %I%     %E% SMI"
    2828
     29
    2930echo "\
    3031/*\n\
     
    3940static const char *const _dt_errtags[] = {"
    4041
    41 pattern='^      \(D_[A-Z0-9_]*\),*'
    42 replace='       "\1",'
    43 
    44 sed -n "s/$pattern/$replace/p" || exit 1
     42# WARNING: Tabs in expressions.
     43#pattern='^     \(D_[A-Z0-9_]*\),*'
     44#replace='      "\1",'
     45#
     46#sed -n "s/$pattern/$replace/p" || exit 1
     47set -x
     48kmk_sed --lang_c -n 's/^[[:space:]]*\(D_[A-Z0-9_]*\),*/ "\1",/p' $1 || exit 1
    4549
    4650echo "\
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