Skip to content

Commit 3efec3f

Browse files
committed
Enable the new command engine in miscellaneous macros, batch #3
commit_hash:ce8c8489d62f829b7e76ff6f785e9b746c8480f9
1 parent 1122e13 commit 3efec3f

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

build/conf/bison_lex.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,5 @@ macro _SRC("lex", SRC, SRCFLAGS...) {
165165
# tag:src-processing
166166
macro _SRC("lpp", SRC, SRCFLAGS...) {
167167
.CMD=$_SRC(l $SRC $SRCFLAGS)
168+
#.STRUCT_CMD=yes
168169
}

build/conf/java.conf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
macro _INPUT_WITH_FLAG(Flag, IN[]) {
2-
.CMD=$_INPUT_WITH_FLAG_IMPL(${pre=$Flag :IN} IN $IN)
3-
}
4-
5-
macro _INPUT_WITH_FLAG_IMPL(IN{input}[], Args...) {
6-
.CMD=$Args ${hide;input:IN}
2+
.CMD=${pre=$Flag ;input:IN}
73
}
84

95
macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") {
106
.PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
117
.CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input;pre=build/scripts/;suf=.py:DEBUG} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:"tools/acceleo"}${RUN_JAR_PROG_CP_SUF} ru.yandex.se.logsng.tool.Cli $_INPUT_WITH_FLAG(--xsd IN $XSD) $_INPUT_WITH_FLAG(--mtl IN $MTL) $_INPUT_WITH_FLAG(--lang IN $LANG) --output-dir $BINDIR --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT} --mtl-root $MTL_ROOT ${hide;output_include:OUTPUT_INCLUDES} ${hide;output:OUT} ${hide;noauto;output:OUT_NOAUTO} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"}
8+
.STRUCT_CMD=yes
129
}
1310

1411
### @usage: JAVA_LIBRARY()

build/conf/project_specific/other.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ BUILD_CATBOOST_SCRIPT=build/scripts/build_catboost.py
88
### CatBoost specific macro.
99
macro BUILD_CATBOOST(CbModel, CbName) {
1010
.CMD=$YMAKE_PYTHON ${input:BUILD_CATBOOST_SCRIPT} build_cb_f $ARCADIA_ROOT $ARCH_TOOL ${input:CbModel} $CbName ${output;pre=cb.;suf=.cpp:CbName} ${hide;output;pre=CB_External_;suf=.rodata:CbName} ${hide;output_include:"kernel/catboost/catboost_calcer.h"} ${hide;kv:"p CB"} ${hide;kv:"pc yellow"}
11+
.STRUCT_CMD=yes
1112
}

build/ymake.core.conf

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,7 @@ macro JOIN_SRCS(Out, Src...) {
28282828
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
28292829
macro JOIN_SRCS_GLOBAL(Out, Src...) {
28302830
.CMD=$YMAKE_PYTHON3 ${input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} ${noauto;output:Out} --ya-start-command-file ${rootrel;context=TEXT;input=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"}
2831+
.STRUCT_CMD=yes
28312832
SRCS(GLOBAL $Out)
28322833
}
28332834

@@ -2838,6 +2839,7 @@ macro JOIN_SRCS_GLOBAL(Out, Src...) {
28382839
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
28392840
macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) {
28402841
.CMD=$FS_TOOLS cat ${noauto;output:Out} --ya-start-command-file ${context=TEXT;input=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"}
2842+
.STRUCT_CMD=yes
28412843
SRCS(GLOBAL $Out)
28422844
}
28432845

@@ -3484,7 +3486,8 @@ macro _SRC_masm(SRC, SRCFLAGS...) {
34843486
### Compile LUA source file to object code using LUA 2.0
34853487
### Optionally override import name which is by default reflects Src name
34863488
macro COMPILE_LUA(Src, NAME="") {
3487-
.CMD=$_SRC(lua, $Src, ${pre=-n :NAME})
3489+
.CMD=$_SRC(lua $Src ${pre=-n :NAME})
3490+
#.STRUCT_CMD=yes
34883491
}
34893492

34903493
# tag:lua-specific
@@ -3502,7 +3505,8 @@ macro _SRC_lua_21(SRC, SRCFLAGS...) {
35023505
### Compile LUA source file to object code using LUA 2.1
35033506
### Optionally override import name which is by default reflects Src name
35043507
macro COMPILE_LUA_21(Src, NAME="") {
3505-
.CMD=$_SRC_lua_21($Src, ${pre=-n :NAME})
3508+
.CMD=$_SRC_lua_21($Src ${pre=-n :NAME})
3509+
.STRUCT_CMD=yes
35063510
}
35073511

35083512
# tag:lua-specific
@@ -3545,6 +3549,7 @@ YDL_DESC_FLAGS=
35453549
# tag:src-processing tag:ydl-specific
35463550
macro _SRC("ydl", SRC, SRCFLAGS...) {
35473551
.CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} c $YDL_FLAGS --cpp-output-header ${output;suf=.h:SRC} --cpp-output-source ${output;suf=.cpp:SRC} ${input:SRC} ${hide;output_include:"statbox/ydl/runtime/cpp/gen_support/standard_includes.h"} ${hide;kv:"p YDL"} ${hide;kv:"pc yellow"}
3552+
.STRUCT_CMD=yes
35483553
.PEERDIR+=statbox/ydl/runtime/cpp
35493554
}
35503555

@@ -3562,6 +3567,7 @@ macro _SRC("ydl", SRC, SRCFLAGS...) {
35623567
### This will parse file ../types.ydl, generate a descriptor for a symbol Event defined in the said file, and put the descriptor to the Event.ydld.
35633568
macro BUILD_YDL_DESC(Input, Symbol, Output) {
35643569
.CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} ti $YDL_FLAGS $YDL_DESC_FLAGS -o ${noauto;output:Output} ${input:Input} ${Symbol} ${hide;kv:"p YDL"} ${hide;kv:"pc yellow"}
3570+
.STRUCT_CMD=yes
35653571
}
35663572

35673573
# tag:ydl-specific
@@ -4476,12 +4482,14 @@ SCHEEME2_STRUCT_INFO_FLAGS=-f "const static ui32 RecordSig" -u "RecordSig" --gcc
44764482
### See tools/structparser for more details.
44774483
macro GEN_SCHEEME2(ScheemeName, FromFile) {
44784484
.CMD=$CXX_COMPILER_OLD $C_FLAGS_PLATFORM -c ${stdout;tmp;suf=.cph:FromFile} $SCHEEME2_CFLAGS ${input:FromFile} ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-error && ${tool:"tools/structparser"} -o ${output;suf=.inc:ScheemeName} -n N${ScheemeName}SchemeInfo $SCHEEME2_STRUCT_INFO_FLAGS $DATAWORK_SCHEEME_EXPORT_FLAGS ${tmp;suf=.cph:FromFile} ${stdout;noauto;output;suf=.inc.log:ScheemeName} ${hide;kv:"p SH"} ${hide;kv:"pc yellow"}
4485+
.STRUCT_CMD=yes
44794486
}
44804487

44814488
### @usage: SYMLINK(from to)
44824489
### Add symlink
44834490
macro SYMLINK(From, To) {
4484-
.CMD=$YMAKE_PYTHON ${input:"build/scripts/symlink.py"} ${input;dirallowed:From} ${noauto;output:To} ${hide;kv:"p LN"} ${hide;kv:"pc light-cyan"}
4491+
.CMD=$YMAKE_PYTHON ${input:"build/scripts/symlink.py"} ${dirallowed;input:From} ${noauto;output:To} ${hide;kv:"p LN"} ${hide;kv:"pc light-cyan"}
4492+
#.STRUCT_CMD=yes
44854493
}
44864494

44874495
macro _FMT_INDUCED_DEPS(For, Deps...) {
@@ -4806,6 +4814,7 @@ macro USE_LLVM_BC18() {
48064814
### Note: Output name is used as is, no extension added.
48074815
macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
48084816
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_RESOURCE_GLOBAL}/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -emit-ast -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p ST"} ${hide;kv:"pc light-green"}
4817+
.STRUCT_CMD=yes
48094818
PEERDIR(build/platform/clang)
48104819
}
48114820

@@ -4859,7 +4868,8 @@ when($OS_LINUX) {
48594868
### Emit eBPF bytecode from .c file.
48604869
### Note: Output name is used as is, no extension added.
48614870
macro BPF_STATIC(Input, Output, Opts...) {
4862-
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_RESOURCE_GLOBAL}/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BP"} ${hide;kv:"pc light-green"} && ${cwd:BINDIR} $LLD_ROOT_RESOURCE_GLOBAL/bin/$LD_BINARY_NAME -r -b binary -m elf_x86_64 -o ${noauto;output;suf=.bpf.o:Input} ${noauto;nopath:Output}
4871+
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_RESOURCE_GLOBAL}/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BP"} ${hide;kv:"pc light-green"} && ${cwd:BINDIR} $LLD_ROOT_RESOURCE_GLOBAL/bin/$LD_BINARY_NAME -r -b binary -m elf_x86_64 -o ${noauto;output;suf=.bpf.o:Input} ${nopath:Output}
4872+
.STRUCT_CMD=yes
48634873
PEERDIR(build/platform/clang build/platform/lld)
48644874
}
48654875

@@ -4869,6 +4879,7 @@ macro BPF_STATIC(Input, Output, Opts...) {
48694879
### Note: Output name is used as is, no extension added.
48704880
macro LLVM_COMPILE_LL(Input, Output, Opts...) {
48714881
.CMD=${CLANG_BC_ROOT}/bin/llvm-as ${input:Input} -o ${noauto;output:Output} ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
4882+
.STRUCT_CMD=yes
48724883
.SEM=custom_runs-ITEM && custom_runs-depends ${input:Input} && custom_runs-command ${LLVMAS} ${input:Input} -o ${noauto;output:Output} && custom_runs-outputs ${noauto;output:Output}
48734884
PEERDIR(build/platform/clang)
48744885
}
@@ -4901,7 +4912,8 @@ macro LLVM_OPT(Input, Output, Opts...) {
49014912
###
49024913
### Note: Output name is calculated as concatenation of Src name and platform specific object file extension.
49034914
macro LLVM_LLC(Src, Opts...) {
4904-
.CMD=${tool:LLVM_LLC_TOOL} ${input:Src} --filetype obj -o ${output;suf=$OBJECT_SUF;noauto:Src} $Opts ${hide;kv:"p LC"} ${hide;kv:"pc yellow"}
4915+
.CMD=${tool:LLVM_LLC_TOOL} ${input:Src} --filetype obj -o ${noauto;output;suf=$OBJECT_SUF:Src} $Opts ${hide;kv:"p LC"} ${hide;kv:"pc yellow"}
4916+
.STRUCT_CMD=yes
49054917
.SEM=custom_runs-ITEM && custom_runs-depends ${input:Src} && custom_runs-command ${LLVMLLC} --filetype obj ${input:Src} -o ${output;suf=$OBJECT_SUF;noauto:Src} $Opts && custom_runs-outputs ${output;suf=$OBJECT_SUF;noauto:Src}
49064918
PEERDIR(build/platform/clang)
49074919
}
@@ -4943,6 +4955,7 @@ PACK_TGZ=${cwd:ARCADIA_BUILD_ROOT} tar -czf ${rootrel:OUTPUT} ${rootrel:INPUT} $
49434955
### Just introduce outputs
49444956
macro TOUCH(Outputs...) {
49454957
.CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${output:Outputs}
4958+
.STRUCT_CMD=yes
49464959
}
49474960

49484961
TOUCH_UNIT=$YMAKE_PYTHON3 ${input:"build/scripts/touch.py"} ${hide;kv:"p UN"} ${hide;kv:"pc light-cyan"} $TARGET
@@ -5832,12 +5845,14 @@ CFLAGS+=$_CFLAGS_VISIBILITY
58325845
# tag:cpp-specific
58335846
macro SDBUS_CPP_ADAPTOR(File) {
58345847
.CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --adaptor=${output;suf=.adaptor.h;nopath;noext:File} ${input:File}
5848+
.STRUCT_CMD=yes
58355849
.PEERDIR=contrib/libs/sdbus-cpp
58365850
}
58375851

58385852
# tag:cpp-specific
58395853
macro SDBUS_CPP_PROXY(File) {
58405854
.CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --proxy=${output;suf=.proxy.h;nopath;noext:File} ${input:File}
5855+
.STRUCT_CMD=yes
58415856
.PEERDIR=contrib/libs/sdbus-cpp
58425857
}
58435858

0 commit comments

Comments
 (0)