summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora11ax <[email protected]>2023-03-20 12:21:00 +0300
committera11ax <[email protected]>2023-03-20 12:21:00 +0300
commit83aaec98b9d45bd6b2d47c30d9769d7aa16dd715 (patch)
tree2e46caffc4d8d6d3dfeeb4d2e13bd20127d38576
parent2fd2059e8afc19056e9760d045a316323300a514 (diff)
fix plugins/ya_make: NOAUTO for codegen files going into join
-rw-r--r--build/conf/project_specific/uservices.conf24
-rw-r--r--build/plugins/uservices.py18
2 files changed, 26 insertions, 16 deletions
diff --git a/build/conf/project_specific/uservices.conf b/build/conf/project_specific/uservices.conf
index ef576656353..f64a1973ce2 100644
--- a/build/conf/project_specific/uservices.conf
+++ b/build/conf/project_specific/uservices.conf
@@ -1,12 +1,12 @@
-macro _MOVE(Src, OUT="", OUT_NOAUTO="", CPP_DEPS[], OUTPUT_INCLUDES[]) {
- .CMD=$MOVE_FILE ${input:Src} ${output;norel:OUT} ${output;noauto;norel:OUT_NOAUTO} ${induced_deps=h+cpp;hide:CPP_DEPS} ${output_includes;hide:OUTPUT_INCLUDES} ${kv;hide:"p MV"} ${kv;hide:"pc light-cyan"}
-}
-
-macro USRV_BUILD(FROM="Please specify generated .tar-file as FROM", DEPS_FILE="NO_DEPS", Files...) {
- .CMD=${tool:"taxi/uservices/arc-gen/unpack-tar"} --source ${input:FROM} --target ${BINDIR} --suffix .usrv ${Files} ${output;noauto;hide;suf=.usrv:Files} ${kv;hide:"p USB"} ${kv;hide:"pc light-cyan"}
- _PROCESS_USRV_FILES(${DEPS_FILE} ${Files})
-}
-
-macro _PROCESS_USRV_FILES(DepsFile, Files...) {
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${DepsFile})
-} \ No newline at end of file
+macro _MOVE(Src, OUT="", OUT_NOAUTO="", CPP_DEPS[], OUTPUT_INCLUDES[]) {
+ .CMD=$MOVE_FILE ${input:Src} ${output;norel:OUT} ${output;noauto;norel:OUT_NOAUTO} ${induced_deps=h+cpp;hide:CPP_DEPS} ${output_includes;hide:OUTPUT_INCLUDES} ${kv;hide:"p MV"} ${kv;hide:"pc light-cyan"}
+}
+
+macro USRV_BUILD(FROM="Please specify generated .tar-file as FROM", DEPS_FILE="NO_DEPS", OUT_NOAUTO[], Files...) {
+ .CMD=${tool:"taxi/uservices/arc-gen/unpack-tar"} --source ${input:FROM} --target ${BINDIR} --suffix .usrv ${Files} ${OUT_NOAUTO} ${output;noauto;hide;suf=.usrv:OUT_NOAUTO} ${output;noauto;hide;suf=.usrv:Files} ${kv;hide:"p USB"} ${kv;hide:"pc light-cyan"}
+ _PROCESS_USRV_FILES(${DEPS_FILE} ${Files} OUT_NOAUTO ${OUT_NOAUTO})
+}
+
+macro _PROCESS_USRV_FILES(DepsFile, Files...) {
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${DepsFile})
+}
diff --git a/build/plugins/uservices.py b/build/plugins/uservices.py
index 9a8deb18d48..12eec99a76d 100644
--- a/build/plugins/uservices.py
+++ b/build/plugins/uservices.py
@@ -2,25 +2,35 @@ import json
import ymake
def on_process_usrv_files(unit, *args):
+ mode = None
if args[0] == 'NO_DEPS':
for f in args[1:]:
- if f.endswith('.cpp'):
+ if f == 'OUT_NOAUTO':
+ mode = f
+ continue
+ if mode is not None:
+ unit.on_move([f + '.usrv', mode, f])
+ elif f.endswith('.cpp'):
unit.on_move([f + '.usrv', 'OUT', f])
else:
unit.on_move([f + '.usrv', 'OUT_NOAUTO', f])
return
-
+
deps_file = unit.resolve(unit.resolve_arc_path(args[0]))
try:
all_deps = json.load(open(deps_file, 'r'))
except Exception as e:
ymake.report_configure_error('Malformed dependencies JSON `{}`: {}'.format(args[0], e.__repr__()))
return
+ mode = 'OUT'
for f in args[1:]:
- try:
+ if f == 'OUT_NOAUTO':
+ mode = f
+ continue
+ try:
deps = all_deps[f]
except KeyError:
ymake.report_configure_error('Dependencies for {} not found in {}'.format(f, args[0]))
unit.on_usrv_mv_with_deps([f])
return
- unit.on_move([f + '.usrv', 'OUT', f, 'CPP_DEPS'] + deps)
+ unit.on_move([f + '.usrv', mode, f, 'CPP_DEPS'] + deps)