Matt, Have you considered using build configurations along with a few #ifdefs or even #if SOME_MACRO_NAME =3D=3D 1 etc? You make a copy of the default build configuration and rename the resulting 2 (or however many you produce) configurations appropriately. In my case, I used it to compile different features and pin configurations depending on which target board revision was being used. As I'm using XC16, I selected the XC16 (Global options) label on the left in the project properties dialog for each of the configurations and in the "define common macros" field set REV_B=3D1 for the revision B build, and REV_B=3D0 for the revision A build. In my code I sprinkled liberally some: #if REV_B =3D=3D 0 //some code for rev A #else //some code for rev B #endif sections where I needed them. Then, when you build your project you either do it the normal way, but selecting the configuration you want from the drop down box at the top, or if you want to build a number of your configurations at once, you use the menu option (Run->Batch build project...) and select the configurations you want using the check-boxes. The microchip youtube video, here https://www.youtube.com/watch?v=3DfClTlSLNNak probably explains it better than I can. The end result is you only need to maintain one set of source files, which should hopefully lead to less possibility of errors once you've got it set up properly. Hope that helps. Patrick On 22 October 2014 10:32, Matt Rhys-Roberts < matt.rhys-roberts@envinsci.co.uk> wrote: > Thanks for the feedback. I look forward to trying out revision control > systems, and taking a fresh look at well-structured #defines and #ifdefs. > > For the time being, I've managed to completely clone and rename mplab-x > projects in order to develop slightly different versions. Even though > the compiler warns me about long filenames it's uncomfortable with, > everything compiles fine nevertheless. My acid test against unwanted > dependencies was to temporarily rename all other project directories, so > the IDE couldn't accidentally refer to anything in them. My first > attempts were discouraged when the IDE somehow referred to the wrong > files, which in hindsight perhaps might have arisen if I didn't properly > specify a different project directory. > > Matt > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .