-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
After been talking with @arturoc and @bakercp, i propose to change the make file for projects with 0.9.0.
There are several reasons to do this. First of all, the current file structure is very inflexible, and it would be good to add some more metadata to the file. First of all add more metadata to the addon dependencies, specifying specific git urls and version (optionally) to addon dependencies. This can be used by the addon manager tool cli tool (ofx) i'm currently working on for automatically handle the addons used in projects, an make sure you use the correct version of an addon.
Secondly renaming the file to config.mk. The current file name is confusing with the .make ending. It is used by the make system, but it's a very unconventional use of a .make file. The .mk file ending is more generic, and is also already used in the addons in the addon_config.mk file so it would make them look more like each other. Also using the same file structure as in the addon_config file for consistency.
The structure I propose is the following (based on feedback from arturo):
#These are optional, but a possibility, and taken from the addon_config.mk
meta:
PROJECT_NAME = name
PROJECT_DESCRIPTION = A project description
PROJECT_AUTHOR = Jonas Jongejan
PROJECT_URL = http://github.com/HalfdanJ/myProject
common:
# dependencies with addons, a list of them separated by spaces
# or use += in several lines
# Specify just addon name
ADDON_DEPENDENCIES += ofxKinect
# Specify url and tag/sha
ADDON_DEPENDENCIES = ofxSniffer:0.1@https://github.com/halfdanj/ofxSniffer
# Specify just tag/sha
ADDON_DEPENDENCIES += ofxCv:0.1
# Variants:
# Matches 0.1.1 0.1.2 0.1.9
ADDON_DEPENDENCIES += ofxCv:0.1.x
# Matches all versions after 0.1
ADDON_DEPENDENCIES += ofxCv:>0.1
# Matches all versions after 0.1 included
ADDON_DEPENDENCIES += ofxCv:>=0.1
# Matches all versions but 0.1
ADDON_DEPENDENCIES += ofxCv:!=0.1
The syntax of specifying url / tag / sha should also be implemented in the addon_config.mk file
This should be implemented in the make system with backward compatibility, so it falls back on looking for a addon.make file.
What places should these changes be implemented? I can think of the following:
- Project generator
- Make file (config.project.mk)
- Project templates
- Example projects
What do people think?
Edit: added greater then, less then syntax