Jump to content
  • Advertisement
Sign in to follow this  
CoffeeMug

Generating \include directory

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can't figure this out for the life of me. I have a project with a pretty complex directory structure, say [...]/projectsrc/[...]. I want to generate an include directory ([...]/projectsrc/include) at the beginning of every build on a windows machine. I've spent quite a bit of time trying to figure out how to do it using windows batch files but I can't seem to get it to work. XCOPY keeps telling me about a cyclic copy (can't I just tell it not to recurse once it detects a cycle?) Also is there a way to get XCOPY to copy all the files into /include without generating a directory structure? This is driving me nuts, seems like a very common thing but there is no info on it online. Also while we're at it, can someone suggest a good bash script to do the same thing (doing it on linux is my next project). Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Thanks Oluseyi. If you could suggest a command that recursively copies all .h files in the project into the newly created include directory, that'd be even better [smile]

Share this post


Link to post
Share on other sites
There isn't a simple command for that, but you can write a script that walks your directory and copies all files matching the *.h pattern to the target directory. Python has an excellent customizable method, os.walk(...). Its last parameter is a function to be called at each level.

Share this post


Link to post
Share on other sites
Here's another good reason: it functions as a portable shell scripting language. No more worrying over various platforms' shell languages.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!