summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/qt5.py3
-rw-r--r--build/util.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/build/qt5.py b/build/qt5.py
index 092c2bca3c..9a4aa73f04 100644
--- a/build/qt5.py
+++ b/build/qt5.py
@@ -208,7 +208,8 @@ class _Automoc:
# Now, check whether the corresponding CPP file
# includes the moc'ed output directly...
- inc_moc_cpp = r'^\s*#\s*include\s+"%s"' % str(moc_cpp[0])
+ inc_path_removed = os.path.split(str(moc_cpp[0]))[1]
+ inc_moc_cpp = r'^\s*#\s*include\s+"%s"' % inc_path_removed
if cpp and re.search(inc_moc_cpp, cpp_contents, re.M):
if moc_options['debug']:
print("scons: qt5: CXX file '%s' directly includes the moc'ed output '%s', no compiling required" % (str(cpp), str(moc_cpp)))
diff --git a/build/util.py b/build/util.py
index 6c8c7a7d12..ce547688b2 100644
--- a/build/util.py
+++ b/build/util.py
@@ -71,7 +71,7 @@ def export_source(source, dest):
def get_git_revision():
- return len(os.popen("git log --pretty=oneline --first-parent").read().splitlines())
+ return os.popen("git rev-list HEAD --first-parent --count").read().strip()
def get_git_modified():