Datageek
Datageek

Reputation: 26709

Compile only some C files in src folder

Is there a way to compile only some *.c (or *.cpp) files in src folder and not all of them? Perhaps it may be possible by modifying Makevars somehow?

A bit of background: I made a mistake of committing some files to the git master branch and would be easier for me to avoid their compilation rather than renaming them all or removing the branch.

Upvotes: 1

Views: 158

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368439

That really is a Makefile (language) question that you can address via a Makevars file with proper settings.

But beware:

  1. R really prefers the default settings and its implicit Makefile. You can get by with Makevars for settings things like compiler / linker options, doing dependencies among files right is much harder. Very few packages do it right. You are more likely to break dual-architecture builds on, eg, OS X and (via Makevars.win) on Windows.

  2. There is no reason to leave the repo in a sad state. Just clean up your git repo, and the world will be a better place too.

Upvotes: 3

Related Questions