0001-Makefile-common.am-Create-src-common-directory-befor.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. From fb3b427bcbc17257ac8c38438a82435b2bd36e38 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 9 May 2025 16:17:05 -0700
  4. Subject: [PATCH] Makefile-common.am: Create src/common directory before
  5. generating fail-html.c
  6. During parallel builds, its possible that <build>/src/common directory is
  7. not yet created and this codepath to generate fail-html.c is executed and
  8. it will end in build failures
  9. Fixes
  10. make[1]: Entering directory 'build/tmp/work/riscv64-yoe-linux/cockpit/337/build'
  11. ../cockpit-337/tools/escape-to-c cockpit_webresponse_fail_html_text < ../cockpit-337/src/common/fail.html > src/common/fail-html.c.tmp && mv src/common/fail-html.c.tmp src/common/fail-html.c
  12. /bin/bash: src/common/fail-html.c.tmp: No such file or directory
  13. make[1]: *** [Makefile:6044: src/common/fail-html.c] Error 1
  14. Upstream-Status: Pending
  15. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  16. ---
  17. src/common/Makefile-common.am | 1 +
  18. 1 file changed, 1 insertion(+)
  19. diff --git a/src/common/Makefile-common.am b/src/common/Makefile-common.am
  20. index ec4b30d..1d55576 100644
  21. --- a/src/common/Makefile-common.am
  22. +++ b/src/common/Makefile-common.am
  23. @@ -94,6 +94,7 @@ libcockpit_common_a_SOURCES = \
  24. # libcockpit-common.a static-links an HTML template to use on failures
  25. nodist_libcockpit_common_a_SOURCES = src/common/fail-html.c
  26. src/common/fail-html.c: src/common/fail.html
  27. + $(MKDIR_P) $(dir $@)
  28. $(AM_V_GEN) $(top_srcdir)/tools/escape-to-c cockpit_webresponse_fail_html_text < $< > $@.tmp && mv $@.tmp $@
  29. CLEANFILES += src/common/fail-html.c
  30. EXTRA_DIST += src/common/fail.html