Currently the top level Makefile has individual lines for each camera & firmware version in three targets - 'batch-zip', 'batch-zip-complete' and 'clean'.
With the ever growing list of ports this is getting a bit unwieldy.
Attached is a patch for review that automates this by scanning the directories under the platform and then for each camera found scans for firmware versions in the sub directory.
For this to work some changes & additions are used:
- A new (optional) include file called 'platform_conf.inc' can be placed in each platform/CAMERA directory. This file can contain any camera specific definitions that are currently duplicated in each sub/xxx/makefile.inc file. It is also used in this case to contain a definition for a STATE variable that defines cameras currently listed as _BETA. The patch includes this file for all cameras currently classified as BETA. The $(STATE) value is then added to the .zip file names during the build.
- For firmware versions that are copies of other versions a new definition is added to the base firmware version makefile.inc file. For example in the d10 100a makefile.inc file the line 'COPY_TO=100b' is added. When the 100a firmware .zip files are built this will be used to copy the 100a files to 100b version files.
- To stop a camera from being built automatically add a file called NO_AUTOBUILD to the platform/CAMERA directory. To stop a specific firmware version from being built; but allow other firmware versions for a camera, add the NO_AUTOBUILD file to the platform/CAMERA/sub/FIRMWARE directory.
Comments & suggestions appreciated.
Phil.