From ba1f160ec917bd59b8b3b712481e69b6fe70ccb0 Mon Sep 17 00:00:00 2001 From: Axel Naumann <Axel.Naumann@cern.ch> Date: Fri, 29 Mar 2019 14:19:09 +0100 Subject: [PATCH] [build] makepchinput.py: fix names of cleaned files: Before, makepchinput.py was not removing some files because they were misnamed (allLinkDef.h vs allLinkDefs.h, cppflags.txt vs allCppflags.txt). Now, let the caller send consistent file names for "remove old files". Remove duplicate allDict.cxx.h (sic!) removal. Also remove allDict.cxx.pch which seems to exist, sometimes? --- build/unix/makepchinput.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/build/unix/makepchinput.py b/build/unix/makepchinput.py index 1fd188a2eae..d76b4775d6b 100755 --- a/build/unix/makepchinput.py +++ b/build/unix/makepchinput.py @@ -20,18 +20,16 @@ def removeFiles(filesList): map(os.unlink, existingFilesList) #------------------------------------------------------------------------------- -def removeLeftOvers(): +def removeLeftOvers(filesToRemove): """ Remove leftover files from old versions of this script. """ - filesToRemove = [os.path.join("include","allHeaders.h"), - os.path.join("include","allHeaders.h.pch"), - os.path.join("include","allLinkDef.h"), - "all.h", - "cppflags.txt", - os.path.join("include","allLinkDef.h"), + filesToRemove.extend( + [os.path.join("include","allHeaders.h.pch"), os.path.join("etc","allDict.cxx"), - os.path.join("etc","allDict.cxx.h")] + os.path.join("etc","allDict.cxx.h"), + os.path.join("etc","allDict.cxx.pch")] + ) removeFiles(filesToRemove) #------------------------------------------------------------------------------- @@ -464,7 +462,6 @@ def makePCHInput(): * etc/dictpch/allCppflags.txt """ rootSrcDir, modules, expPyROOT, clingetpchList, cxxflags = getParams() - removeLeftOvers() outdir = os.path.join("etc","dictpch") allHeadersFilename = os.path.join(outdir,"allHeaders.h") @@ -478,7 +475,7 @@ def makePCHInput(): cppFlagsFilename.replace("\\","/") mkdirIfNotThere(outdir) - removeFiles((allHeadersFilename,allLinkdefsFilename)) + removeLeftOvers([allHeadersFilename, allLinkdefsFilename, cppFlagsFilename]) allHeadersContent = getSTLIncludes() allHeadersContent += getExtraIncludes(clingetpchList) -- GitLab