openframeworks / openframeworks/openFrameworks
Rename addon.make, and restructure the content
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing addon.make handling in config.project.mk and compare it with addon_config.mk. Then trace the project generator, project templates, and example projects to identify every place that assumes addon.make. Done means config.mk and the proposed dependency metadata work with backward-compatible addon.make fallback across those areas.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100