Skip to content

Commit a29bc26

Browse files
authored
SIP84 Remove utilities (#141)
* Removes utilities * Updates after utilities removal
1 parent a4ccea7 commit a29bc26

File tree

5 files changed

+11
-721
lines changed

5 files changed

+11
-721
lines changed

Makefile

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,7 @@ SIPNET_CFILES:=$(addprefix src/sipnet/, $(SIPNET_CFILES))
1616
SIPNET_OFILES=$(SIPNET_CFILES:.c=.o)
1717
SIPNET_LIBS=-lsipnet_common
1818

19-
# Utilities
20-
TRANSPOSE_CFILES:=transpose.c
21-
TRANSPOSE_CFILES:=$(addprefix src/utilities/, $(TRANSPOSE_CFILES))
22-
TRANSPOSE_OFILES=$(TRANSPOSE_CFILES:.c=.o)
23-
TRANSPOSE_LIBS=-lsipnet_common
24-
25-
SUBSET_DATA_CFILES:=subsetData.c
26-
SUBSET_DATA_CFILES:=$(addprefix src/utilities/, $(SUBSET_DATA_CFILES))
27-
SUBSET_DATA_OFILES=$(SUBSET_DATA_CFILES:.c=.o)
28-
SUBSET_DATA_LIBS=-lsipnet_common
29-
30-
CFILES=$(sort $(SIPNET_CFILES) $(TRANSPOSE_CFILES) $(SUBSET_DATA_CFILES))
19+
CFILES=$(sort $(SIPNET_CFILES))
3120

3221
SIPNET_LIB=$(LIB_DIR)/libsipnet.a
3322
COMMON_LIB=$(LIB_DIR)/libsipnet_common.a
@@ -45,11 +34,8 @@ DOXYGEN_LATEX_DIR = docs/latex
4534
# We use this below to compile the hash into the binary for ease of debugging
4635
GIT_HASH := $(shell git rev-parse --short=10 HEAD; git diff-index --quiet HEAD || echo " plus uncommitted changes")
4736

48-
# the main executables - the original 'all' target
49-
exec: sipnet transpose subsetData
50-
51-
# with the default set to 'sipnet', we can have all do (close to) everything
52-
all: exec document
37+
# all does everything build related (but not test)
38+
all: sipnet document
5339

5440
# Build documentation with both Doxygen and Mkdocs
5541
document: .doxygen.stamp .mkdocs.stamp
@@ -86,16 +72,10 @@ info:
8672
sipnet: info $(SIPNET_OFILES) $(COMMON_LIB)
8773
$(LD) $(LDFLAGS) -o sipnet $(SIPNET_OFILES) $(LIBLINKS) $(SIPNET_LIBS)
8874

89-
transpose: $(TRANSPOSE_OFILES) $(COMMON_LIB)
90-
$(LD) $(LDFLAGS) -o transpose $(TRANSPOSE_OFILES) $(LIBLINKS) $(TRANSPOSE_LIBS)
91-
92-
subsetData: $(SUBSET_DATA_OFILES) $(COMMON_LIB)
93-
$(LD) $(LDFLAGS) -o subsetData $(SUBSET_DATA_OFILES) $(LIBLINKS) $(SUBSET_DATA_LIBS)
94-
9575
clean:
96-
rm -f $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) $(COMMON_OFILES)
76+
rm -f $(SIPNET_OFILES) $(COMMON_OFILES)
9777
rm -f $(COMMON_LIB) $(SIPNET_LIB)
98-
rm -f sipnet transpose subsetData
78+
rm -f sipnet
9979
rm -rf $(DOXYGEN_HTML_DIR) $(DOXYGEN_LATEX_DIR)
10080
rm -rf site/
10181
rm -f .doxygen.stamp .mkdocs.stamp
@@ -124,7 +104,7 @@ $(SIPNET_TEST_DIRS_CLEAN):
124104

125105
cleanall: clean testclean
126106

127-
.PHONY: all clean histutil help document exec cleanall \
107+
.PHONY: all clean help document exec cleanall \
128108
test $(SIPNET_TEST_DIRS) $(SIPNET_TEST_DIRS_RUN) testclean $(SIPNET_TEST_DIRS_CLEAN) testrun
129109

130110
help:
@@ -133,20 +113,15 @@ help:
133113
@echo " === Core Targets ==="
134114
@echo " sipnet - (also default target) Build the sipnet executable; see sipnet.in in the src/sipnet"
135115
@echo " directory for a sample input file"
136-
@echo " exec - Build the above executables and all utilities (see below)"
137116
@echo " document - Generate documentation (via doxygen and mkdocs)"
138-
@echo " all - Build all above executables and the documentation"
117+
@echo " all - Build sipnet executable and the documentation"
139118
@echo " clean - Remove compiled files, executables, and documentation"
140119
@echo " depend - Generate build dependency information for source files and append to Makefile"
141-
@echo " === Utilities ==="
142-
@echo " transpose - read in and transpose a matrix"
143-
@echo " subsetData - subset input files (e.g., .clim, .dat, .valid, .sigma, .spd) from a specified start date"
144-
@echo " and length of time in days (see src/utilities/subset.in for sample input file)"
145120
@echo " === Tests ==="
146121
@echo " test - Build the unit tests"
147122
@echo " testrun - Run the unit tests"
148123
@echo " testclean - Clean build artifacts and executables from the unit tests"
149-
@echo " cleanall - Run both clean and testclean
124+
@echo " cleanall - Run both clean and testclean"
150125

151126

152127
# Make sure this target and subsequent comment remain at the bottom of this file

src/README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
11
# SIPNET Source Code Documentation
22
<!--This README is also used as the main page for Doxygen-generated documentation.-->
33

4-
This document provides an overview of the SIPNET model source code and utilities.
4+
This document provides an overview of the SIPNET model source code.
55

66
## Organization and Packages
77

88
[Redo this once we finish code reduction changes]
99

1010
Organization strategy:
1111
* SIPNET and common files each have their own directory
12-
* Stand-alone utilities all go into the `utilities` subdirectory
1312

1413
### Main program - SIPNET
1514

16-
[Add description here of SIPNET's "compilation switch" strategy - which hopefully
17-
will become command-line params at some point, but not yet. We need to doc the
18-
possible switches somewhere...]
19-
20-
### Stand-alone Utilities
21-
22-
**subsetData**: A utility to subset a data record temporally. This utility
23-
can also perform daily aggregation on the data if so desired. Its
24-
operation is controlled by subset.in.
25-
26-
**transpose**: A little utility to transpose a text file that contains a
27-
rectangular matrix of data. This may be necessary to read certain files
28-
into Excel (e.g. the single-variable output files). Its usage is
29-
'transpose filename'.
15+
[TODO: add some sort of description here, though it isn't clear what. Now that all extraneous code is gone (estimate,
16+
utilities), it is unclear what the purpose of this page is.]

src/utilities/subset.in

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)