Skip to content

Commit 08eb706

Browse files
authored
Merge pull request #21 from PecanProject/doxygen
Update Doxygen and Makefile
2 parents 4897f81 + 573a76c commit 08eb706

File tree

5 files changed

+87
-9
lines changed

5 files changed

+87
-9
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ jobs:
2525
# checkout source code
2626
- uses: actions/checkout@v2
2727

28-
# compile sipnet
28+
# install doxygen
29+
- name: Install Doxygen
30+
run: |
31+
if [[ "$RUNNER_OS" == "Linux" ]]; then
32+
sudo apt-get install doxygen -y
33+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
34+
brew install --formula doxygen
35+
fi
36+
37+
# compile SIPNET
2938
- name: compile sipnet
3039
run: make
3140

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1+
# build artifacts and executables
12
*.o
23
estimate
34
sipnet
45
subsetData
56
transpose
7+
.doxygen.stamp
8+
9+
# documentation
10+
docs/html
11+
docs/latex
12+
13+
.DS_Store
14+
.Rproj.user
15+
.Rhistory
16+
17+
# System-specific files
18+
.DS_Store
19+
.Rproj.user
20+
.Rhistory
21+
22+
# Temporary and backup files
23+
*.bak
24+
*~
25+
*.tmp

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
## Style Guide
3+
4+
## Compiling
5+
6+
SIPNET uses `make` to build the model and documentation. There are also miscellaneous targets for running analysis workflows:
7+
8+
```sh
9+
# build SIPNET executable
10+
make sipnet
11+
# build documentation
12+
make document
13+
# clean up build artifacts
14+
make clean
15+
# list all make commands
16+
make help
17+
```

Makefile

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,27 @@ TRANSPOSE_OFILES=$(TRANSPOSE_CFILES:.c=.o)
1818
SUBSET_DATA_CFILES=subsetData.c util.c namelistInput.c
1919
SUBSET_DATA_OFILES=$(SUBSET_DATA_CFILES:.c=.o)
2020

21+
CFILES=$(sort $(ESTIMATE_CFILES) $(SENSTEST_CFILES) $(SIPNET_CFILES) $(TRANSPOSE_CFILES) $(SUBSET_DATA_CFILES))
22+
23+
# Doxygen
24+
DOXYFILE = docs/Doxyfile
25+
DOXYGEN_HTML_DIR = docs/html
26+
DOXYGEN_LATEX_DIR = docs/latex
27+
28+
# .PHONY indicates target names that are not file names, preventing conflicts if these names are used for filenames
29+
.PHONY: all clean document estimate sipnet transpose subsetData doxygen
30+
2131
# all: estimate sensTest sipnet transpose subsetData
22-
all: estimate sipnet transpose subsetData
32+
all: estimate sipnet transpose subsetData document
33+
34+
35+
# Only update docs if source files or Doxyfile have changed
36+
document: .doxygen.stamp
37+
38+
.doxygen.stamp: $(CFILES) $(DOXYFILE)
39+
@echo "Running Doxygen..."
40+
doxygen $(DOXYFILE)
41+
@touch .doxygen.stamp
2342

2443
estimate: $(ESTIMATE_OFILES)
2544
$(LD) -o estimate $(ESTIMATE_OFILES) $(LIBLINKS)
@@ -38,14 +57,27 @@ subsetData: $(SUBSET_DATA_OFILES)
3857

3958
clean:
4059
rm -f $(ESTIMATE_OFILES) $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) estimate sensTest sipnet transpose subsetData
41-
60+
rm -rf $(DOXYGEN_HTML_DIR) $(DOXYGEN_LATEX_DIR)
4261
#clean:
4362
# rm -f $(ESTIMATE_OFILES) $(SENSTEST_OFILES) $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) estimate sensTest sipnet transpose subsetData
4463

64+
help:
65+
@echo "Available targets:"
66+
@echo " help - Display this help message."
67+
@echo " === core targets ==="
68+
@echo " all - Builds all components."
69+
@echo " document - Generate documentation."
70+
@echo " sipnet - Builds the 'sipnet' executable."
71+
@echo " clean - Removes compiled files, executables, and documentation."
72+
@echo " depend - Automatically generates dependency information for source files."
73+
@echo " === additional tools ==="
74+
@echo " estimate - Builds 'estimate' executable to estimate parameters using MCMC."
75+
@echo " transpose - Builds 'transpose' executable to read in and transpose a matrix"
76+
@echo " subsetData - Builds 'subsetData' executable that subsets input files (e.g., .clim, .dat, .valid, .sigma, .spd) from a specified start date and length of time in days."
4577

46-
#This target automatically builds dependencies.
4778
depend::
4879
makedepend $(CFILES)
4980

5081
# DO NOT DELETE THIS LINE -- make depend depends on it.
5182

83+

docs/Doxyfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#---------------------------------------------------------------------------
66
PROJECT_NAME = SIPNET
77
PROJECT_NUMBER = 1.0
8-
OUTPUT_DIRECTORY = /Users/aulenbac/Documents/workspace/SIPNET/docs
9-
CREATE_SUBDIRS = NO
8+
OUTPUT_DIRECTORY = docs
9+
CREATE_SUBDIRS = YES
1010
OUTPUT_LANGUAGE = English
1111
USE_WINDOWS_ENCODING = NO
1212
BRIEF_MEMBER_DESC = YES
@@ -24,8 +24,8 @@ ABBREVIATE_BRIEF = "The $name class" \
2424
the
2525
ALWAYS_DETAILED_SEC = NO
2626
INLINE_INHERITED_MEMB = NO
27-
FULL_PATH_NAMES = YES
28-
STRIP_FROM_PATH = /Applications/
27+
FULL_PATH_NAMES = NO
28+
STRIP_FROM_PATH = ../..
2929
STRIP_FROM_INC_PATH =
3030
SHORT_NAMES = NO
3131
JAVADOC_AUTOBRIEF = NO
@@ -82,7 +82,7 @@ WARN_LOGFILE =
8282
#---------------------------------------------------------------------------
8383
# configuration options related to the input files
8484
#---------------------------------------------------------------------------
85-
INPUT = /Users/aulenbac/Documents/workspace/SIPNET
85+
INPUT = ../
8686
FILE_PATTERNS = *.c \
8787
*.cc \
8888
*.cxx \

0 commit comments

Comments
 (0)