Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ FILES += $(shell find ../pages -name "*.md")
DEPS = Doxyfile.cfg DoxygenLayout.xml $(FILES)

all: $(DEPS)
$(DOXYGEN_CMD) Doxyfile.cfg
$(DOXYGEN_CMD) Doxyfile.cfg $(DOXYGEN_EXTRA_PARAMS)

vars:
@echo PROJECT_NAME: $(PROJECT_NAME)
Expand Down
53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module Documentation

# History
## History

|Version|Date (YY-MM-DD) |Comments|
|-------|----------------|------|
Expand All @@ -10,24 +10,25 @@

- [Module Documentation](#module-documentation)
- [History](#history)
- [Table of Contents](#table-of-contents)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Structure](#structure)
- [Reference Template](#reference-template)
- [Generator Caller Script](#generator-caller-script)

# Overview
## Overview

As part of the requirement in creating a code module, it must be documented.

This class creates a common framework for including documentation in a common way.

- Template Location - https://github.com/rdkcentral/hal-doxygen
- Template Location - [https://github.com/rdkcentral/hal-doxygen](https://github.com/rdkcentral/hal-doxygen)

# Structure
## Structure

The structure of repo of the surrounding module is expected to be :-

```
```bash
.
├── docs
│   ├── build -> [This repo]
Expand All @@ -44,15 +45,15 @@ The structure of repo of the surrounding module is expected to be :-
├── include -> Location of header files *.h search pattern applied from the doxygen configuration
```

* Note: pages *.md is searched, as well as include/*.h
- Note: pages *.md is searched, as well as include/*.h

# Reference Template
## Reference Template

Including in this repository in the `template` directory reference structure for the document directory.

This should be copied verbatim, then modifier as required for the specific component where `HAL` documentation is to be generated.

```
```bash
template
└── docs
├── generate_docs.sh
Expand All @@ -70,3 +71,37 @@ template
```

The `generate_docs.sh` when ran will create this `git repo` under the `build` directory.

## Generator Caller Script

The expection is that the makefile would be called by the upper layers via a simple generator script, which would clone the common code, and pass extra parameters to the configuration it is upto the caller to modify the requirements for their project.

Variables that should be reviewed for correctness :-

|Variable|Comment|
|--------|-------|
|PROJECT_NAME | The name of the project / subproject|
|PROJECT_VERSION | version of the project, this is derived by default from the git tag|
|DOXYGEN_EXTRA_PARAMS | any extra params you wish to pass to doxygen|
|HAL_GENERATOR_VERSION | offical released version of the generator to use (master contains the latest release version, but it's upto the caller if they want to specify a fixed version)|

```bash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to change the template, and upgrade to 1.2.0 as the fixed release HAL_GENERATOR_VERSION=master

It's unto the users of the script to specify the version of oxygen they wish to use, if they wish to use the latest release then master is fine. As a template we should state that.

# In the future this should moved to a fixed verison
HAL_GENERATOR_VERSION=master

# This will look up the last tag in the git repo, depending on the project this may require modification
PROJECT_VERSION=$(git describe --tags | head -n1)
DOXYGEN_EXTRA_PARAMS="-d CODE_DEFINE_REQUIRED"

# Check if the common document configuration is present, if not clone it
if [ -d "./build" ]; then
make -C ./build PROJECT_NAME="Project Name" PROJECT_VERSION=${PROJECT_VERSION} DOXYGEN_EXTRA_PARAMS=${DOXYGEN_EXTRA_PARAMS}"
else
echo "Cloning Common documentation generation"
git clone git@github.com:rdkcentral/hal-doxygen.git build
cd ./build
git checkout ${HAL_GENERATOR_VERSION}
cd ..
./${0}
fi
```