When calling XDC from the command line, is there a way to have 'xdc clean' remove .xdcenv.mak files? I tried the following using XDCtools 3.22.04.46. with no luck:
xdc clean, .xdcenv.mak
Thanks,
Nick
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Nick,
the file package.mak that does the cleaning has a dependency on .xdcenv.mak, so removing .xdcenv.mak is not really supported or recommended. But, if you really need to do it, try adding following to your package.bld
Pkg.makeEpilogue = "clean::\n\trm -rf .xdcenv.mak";
and run 'xdc clean'.
Adding that line to the package.bld file didn't cause any problems, but it didn't remove the .xdcenv.mak file either.
The main reason I'd like to remove that file is that it seems to store information regarding the selected build profile. I'd like to be able to switch profiles without having to manually delete the file every time I build. Maybe our build process just needs to emulate that of CCS managed projects and use separate folders for debug and release... That might be the way we end up going.
How do you specify a profile? .xdcenv.mak should not overwrite the profile you specified.
I set Pkg.attrs.profile in my package.bld file to either "debug" or "release" depending on environment variables.
For different profiles, we sometimes use different XDCBUILDCFG files that specify different platforms. Since .xdcenv.mak stores XDCBUILDCFG, it then points to the wrong platform when switching from debug to release or vice versa.
Nick,
I created a similar example with the environment variable XDCPROF defining the profile, and the environment variable XDCBUILDCFG pointing to config.bld files. Just by setting those two variables I get the right profile and the right config.bld, no matter what's in .xdcenv.mak. Is there anything else more specific about your setup? Can you post the whole xdc command line and package.bld?
Hmm. I'll take at look at my build setup again; I'm using scripts to make the xdc call and to setup environment variables. It's likely that the scripts are the issue. My original question has been answered now since I was concerned about deleting .xdcenv.mak only. If that file is updated on each build, it shouldn't matter if it is not deleted as you stated.
Thanks for the input,
Nick