esynr3z / corsair

Control and Status Register map generator for HDL projects
https://corsair.readthedocs.io
MIT License
97 stars 35 forks source link

Add gitignore which included all auto-generated files #14

Open iDoka opened 2 years ago

iDoka commented 2 years ago

Based on good practice of usage auto-generated source files in VCS should store only sources ("input" to generate some auto-generated entities), therefore auto-generated sources should not added under VCS control. To avoid this, we must also generate a .gitignore file which included all auto-generated files.

Most convenient way to do this required to add new variable to csrconfig in [globcfg] section like BASEDIR - the root path for other sections. All another path variables from secondary sections should complement BASEDIR path to get full path.

In this case we can place .gitignore in BASEDIR and place path and files into .gitignore relative to BASEDIR.

I think this is the easiest way to achieve goal: auto-generated files cannot accidentally add under VCS control.

would be great to automaticaly add informative header to all auto-generated entities as comment: