SoC common: Makefile: improve make release [1/1]
PD#SWPL-61282
Problem:
improve make distclean
Solution:
use sed instead of git when restoring Doxyfile
Verify:
all
Change-Id: Ic4293545a03a0456497dc14d005b55e40af4c980
Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com>
diff --git a/Makefile b/Makefile
index 86ab9dd..203f65a 100644
--- a/Makefile
+++ b/Makefile
@@ -324,6 +324,8 @@
package:
./scripts/package.sh
+DOC_PROJECT_NUMBER_LINE = $(shell grep "PROJECT_NUMBER.*=" $(docs_DIR)/Doxyfile)
+
.PHONY: release
release:
@ if [ -f $(PRJDIR)/CMakeLists.txt ] && [ -f $(PRJDIR)/Kconfig ] && [ -f $(kernel_BUILD_DIR)/sdk_ver.h ]; then \
@@ -335,7 +337,7 @@
-cJf rtos_sdk_$(RELEASE_VERSION).tar.xz $(notdir $(PRJDIR)); \
mv rtos_sdk_$(RELEASE_VERSION).tar.xz $(PRJDIR); \
cd - > /dev/null); \
- (cd $(docs_DIR) && git reset --hard -q && cd - > /dev/null); \
+ sed -i 's/PROJECT_NUMBER.*=.*/$(DOC_PROJECT_NUMBER_LINE)/' $(docs_DIR)/Doxyfile; \
else \
echo "Please execute make in advance!"; \
fi