Skip to content

Commit 1732fc0

Browse files
committed
remove op in debian/rules
1 parent 501fc9a commit 1732fc0

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

common/Makefile.am

+8-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ EXTRA_DIST = gen_cfg_schema.py
2323
BUILT_SOURCES = common/cfg_schema.h
2424

2525
# Rule to generate cfg_schema.h and make it depend on gen_cfg_schema.py
26-
common/cfg_schema.h: $(srcdir)/gen_cfg_schema.py
27-
$(AM_V_GEN)$(PYTHON) $< -o $@
26+
#common/cfg_schema.h: $(srcdir)/gen_cfg_schema.py
27+
# $(AM_V_GEN)$(PYTHON) $< -o $@
2828

29-
# Make sure the header is cleaned up
30-
CLEANFILES += common/cfg_schema.h
29+
common/cfg_schema.h: FORCE
30+
$(AM_V_GEN)$(PYTHON) $(srcdir)/gen_cfg_schema.py -o $@
31+
32+
# FORCE target to ensure cfg_schema.h is always regenerated
33+
.PHONY: FORCE
34+
FORCE:
3135

3236
common_libswsscommon_la_SOURCES = \
3337
common/events_common.cpp \

common/cfg_schema.h

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef CFG_SCHEMA_H
22
#define CFG_SCHEMA_H
33

4+
// Macros for table names are autogenerated by gen_cfg_schema.py. Manual update will not be preserved.
45
#ifdef __cplusplus
56
namespace swss {
67
#endif

debian/rules

-11
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ endif
3939
%:
4040
dh $@
4141

42-
# Install Python dependencies before building
43-
override_dh_auto_build:
44-
# Check if required variables are set
45-
@if [ -z "$(WHEELS_ROOT_DIR)" ] || [ -z "$(PYTHON_WHEELS_PATH)" ]; then \
46-
echo "Error: WHEELS_ROOT_DIR and PYTHON_WHEELS_PATH must be set"; \
47-
exit 1; \
48-
fi
49-
# Find and install required Python packages from wheels using absolute path
50-
python3 -m pip install $(shell find $(WHEELS_ROOT_DIR)/$(PYTHON_WHEELS_PATH) -name "sonic_yang_mgmt*.whl") $(shell find $(WHEELS_ROOT_DIR)/$(PYTHON_WHEELS_PATH) -name "sonic_yang_models*.whl")
51-
dh_auto_build
52-
5342
# dh_make generated override targets
5443
# This is example for Cmake (See https://bugs.debian.org/641051 )
5544
override_dh_auto_configure:

gen_cfg_schema.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def write_cfg_schema(keys, output_file="cfg_schema.h"):
88
header = """#ifndef CFG_SCHEMA_H
99
#define CFG_SCHEMA_H
1010
11+
// Macros for table names are autogenerated by gen_cfg_schema.py. Manual update will not be preserved.
1112
#ifdef __cplusplus
1213
namespace swss {
1314
#endif

0 commit comments

Comments
 (0)