File: 01-fix-conftypes-py-build-path.diff

package info (click to toggle)
hatari 2.5.0%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 13,324 kB
  • sloc: ansic: 164,630; cpp: 8,685; python: 6,251; objc: 1,899; asm: 1,742; sh: 1,668; javascript: 146; makefile: 86; xml: 32
file content (31 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: Make build scripts for python-ui respect the build path
 Fixes FTBFS when built twice in a row from the same source tree.
Author: Teemu Hukkanen <tjhukkan@iki.fi>
Forwarded: yes

Index: pkg-hatari/python-ui/CMakeLists.txt
===================================================================
--- pkg-hatari.orig/python-ui/CMakeLists.txt
+++ pkg-hatari/python-ui/CMakeLists.txt
@@ -1,9 +1,9 @@
 # conftypes.py is created to source directory (instead of build directory)
 # so that Hatari UI can be tested directly from the source directory
-add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/conftypes.py
-	COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gentypes.py < ${CMAKE_CURRENT_SOURCE_DIR}/../src/configuration.c > ${CMAKE_CURRENT_SOURCE_DIR}/conftypes.py
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/conftypes.py
+	COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gentypes.py < ${CMAKE_CURRENT_SOURCE_DIR}/../src/configuration.c > ${CMAKE_CURRENT_BINARY_DIR}/conftypes.py
 	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../src/configuration.c ${CMAKE_CURRENT_SOURCE_DIR}/gentypes.py)
-add_custom_target(conftypes ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/conftypes.py)
+add_custom_target(conftypes ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/conftypes.py)
 
 INSTALL(PROGRAMS hatariui
 	DESTINATION ${BINDIR})
@@ -15,7 +15,7 @@ INSTALL(PROGRAMS hatariui.py debugui.py
 # Changing that would require change also in uihelpers.py
 INSTALL(FILES hatari-icon.png hatari-logo.png
 	config.py dialogs.py hatari.py uihelpers.py
-	${CMAKE_CURRENT_SOURCE_DIR}/conftypes.py
+	${CMAKE_CURRENT_BINARY_DIR}/conftypes.py
 	DESTINATION ${DATADIR}/hatariui/)
 
 # Hatari UI Help menu items are searched from docdir.