Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename tools directory to utils #1348

Merged
merged 3 commits into from
Feb 17, 2021
Merged
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 @@ -26,7 +26,7 @@ DATE := $(shell date '+%d_%m_%Y')

DIRS = \
demolocation \
tools \
utils \
include \
lib \
db \
Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
scripts = [
"clean.sh",
];
scripts.each { |script| host.vm.provision :shell, :privileged => false, :path => "tools/vagrant/" << script }
scripts.each { |script| host.vm.provision :shell, :privileged => false, :path => "utils/vagrant/" << script }
end
scripts = [
"compile.sh",
];
scripts.each { |script| host.vm.provision :shell, :privileged => false, :path => "tools/vagrant/" << script }
scripts.each { |script| host.vm.provision :shell, :privileged => false, :path => "utils/vagrant/" << script }
end
end
6 changes: 3 additions & 3 deletions doc/howto_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Check examples if still compiling
### Fix typos in source code with

```bash
tools/fix_typos.sh
utils/fix_typos.sh
```

### i18N: sync from Transifex
Expand All @@ -29,7 +29,7 @@ master .po files

```bash
cd locale
sh ~/software/grass-addons/tools/transifex_merge.sh
sh ~/software/grass-addons/utils/transifex_merge.sh
make
make verify
# ... then fix .po files as needed.
Expand Down Expand Up @@ -179,7 +179,7 @@ md5sum grass-${VERSION}.tar.gz > grass-${VERSION}.md5sum
Create Changelog file on release branch:

```bash
python tools/gitlog2changelog.py
python utils/gitlog2changelog.py
mv ChangeLog ChangeLog_$VERSION
head ChangeLog_$VERSION
gzip ChangeLog_$VERSION
Expand Down
2 changes: 1 addition & 1 deletion doc/html_documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ HOWTO document in this GRASS version?
the module with the --html-description qualifier:
g.module --html-description

- see also this script: tools/build_html_index.html
- see also this script: utils/build_html_index.html

- The Programmers' manual can by created from the inline Doxygen comments with:
make htmldocs (or)
Expand Down
2 changes: 1 addition & 1 deletion gui/images/symbols/README
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ run script in symbol group directory (e.g. ./lib/symbol/symbol/basic)
within a GRASS session. ImageMagic should take care of compressing the
image as much as possible.

tools/symbol_to_img.sh
utils/symbol_to_img.sh

Image should have 30x30 px to be displayed correctly in GUI dialog. If the symbol
has different width and height, you are supposed to correct it (for example
Expand Down
4 changes: 2 additions & 2 deletions include/Make/Docs.make
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ html2pdfdoccomplete:

changelog:
@ echo "creating ChangeLog file (following 'master' only)..."
@ # tools/gitlog2changelog.py creates a GNU style ChangeLog file:
python tools/gitlog2changelog.py
@ # utils/gitlog2changelog.py creates a GNU style ChangeLog file:
python utils/gitlog2changelog.py

.PHONY: htmldocs-single htmldocs packagehtmldocs pdfdocs cleandocs html2pdfdoc
.PHONY: html2pdfdoccomplete changelog
2 changes: 1 addition & 1 deletion include/Make/Doxyfile_arch_html.in
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ EXCLUDE = bin.@ARCH@ \
sites \
temporal \
testsuite \
tools \
utils \
vector \
visualization

Expand Down
2 changes: 1 addition & 1 deletion include/Make/Doxyfile_arch_latex.in
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ EXCLUDE = bin.@ARCH@ \
sites \
temporal \
testsuite \
tools \
utils \
vector \
visualization

Expand Down
4 changes: 2 additions & 2 deletions include/Make/Grass.make
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ HTMLDIR = $(ARCH_DISTDIR)/docs/html
SCRIPTDIR = $(ARCH_DISTDIR)/scripts
MSG_DIR = $(ARCH_DISTDIR)/etc/msgs
MO_DIR = $(ARCH_DISTDIR)/locale
TOOLSDIR = $(ARCH_DISTDIR)/tools
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
UTILSDIR = $(ARCH_DISTDIR)/utils

FONTDIR = $(ARCH_DISTDIR)/fonts

Expand Down Expand Up @@ -97,7 +97,7 @@ YFLAGS = -d -v
MANSECT = 1
MANBASEDIR = $(ARCH_DISTDIR)/docs/man
MANDIR = $(MANBASEDIR)/man$(MANSECT)
HTML2MAN = VERSION_NUMBER=$(GRASS_VERSION_NUMBER) $(GISBASE)/tools/g.html2man.py
HTML2MAN = VERSION_NUMBER=$(GRASS_VERSION_NUMBER) $(GISBASE)/utils/g.html2man.py

GDAL_LINK = $(USE_GDAL)
GDAL_DYNAMIC = 1
Expand Down
4 changes: 2 additions & 2 deletions include/Make/GuiScript.make
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ endif

$(HTMLDIR)/g.gui.%.html: g.gui.%.html g.gui.%.tmp.html | $(HTMLDIR)
VERSION_NUMBER=$(GRASS_VERSION_NUMBER) VERSION_DATE=$(GRASS_VERSION_DATE) MODULE_TOPDIR=$(MODULE_TOPDIR) \
$(PYTHON) $(GISBASE)/tools/mkhtml.py g.gui.$* $(GRASS_VERSION_DATE) > $@
$(PYTHON) $(GISBASE)/utils/mkhtml.py g.gui.$* $(GRASS_VERSION_DATE) > $@

$(HTMLDIR)/wxGUI.%.html: g.gui.%.html | $(HTMLDIR)
-rm -f g.gui.$*.tmp.html
VERSION_NUMBER=$(GRASS_VERSION_NUMBER) VERSION_DATE=$(GRASS_VERSION_DATE) MODULE_TOPDIR=$(MODULE_TOPDIR) \
$(PYTHON) $(GISBASE)/tools/mkhtml.py g.gui.$* $(GRASS_VERSION_DATE) > $@
$(PYTHON) $(GISBASE)/utils/mkhtml.py g.gui.$* $(GRASS_VERSION_DATE) > $@

g.gui.%.tmp.html: $(SCRIPTDIR)/g.gui.%
$(call htmldesc,$<,$@)
Expand Down
2 changes: 1 addition & 1 deletion include/Make/Html.make
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include $(MODULE_TOPDIR)/include/Make/HtmlRules.make

$(HTMLDIR)/%.html: %.html %.tmp.html $(HTMLSRC) $(IMGDST) | $(HTMLDIR)
VERSION_NUMBER=$(GRASS_VERSION_NUMBER) VERSION_DATE=$(GRASS_VERSION_DATE) MODULE_TOPDIR=$(MODULE_TOPDIR) \
$(PYTHON) $(GISBASE)/tools/mkhtml.py $* > $@
$(PYTHON) $(GISBASE)/utils/mkhtml.py $* > $@

$(MANDIR)/%.$(MANSECT): $(HTMLDIR)/%.html
$(HTML2MAN) "$<" "$@"
Expand Down
4 changes: 2 additions & 2 deletions include/Make/Install.make
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BIN_DIST_FILES = $(FILES) \
lib \
locale \
scripts \
tools \
utils \
share

# Shell commands
Expand Down Expand Up @@ -211,7 +211,7 @@ srclibsdist: distclean

@ # needed to store code in package with grass-version path:
-cp -L * ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL tools ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL utils ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL demolocation ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL include ./grass-lib-$(GRASS_VERSION_NUMBER)
-cp -rL --parents lib/external/shapelib ./grass-lib-$(GRASS_VERSION_NUMBER)
Expand Down
6 changes: 3 additions & 3 deletions include/Make/Rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ first: pre default
ARCH_DIRS = $(ARCH_DISTDIR) $(ARCH_BINDIR) $(ARCH_INCDIR) $(ARCH_LIBDIR) \
$(BIN) $(ETC) \
$(DRIVERDIR) $(DBDRIVERDIR) $(FONTDIR) $(DOCSDIR) $(HTMLDIR) \
$(MANBASEDIR) $(MANDIR) $(TOOLSDIR)
$(MANBASEDIR) $(MANDIR) $(UTILSDIR)

pre: | $(ARCH_DIRS)

Expand All @@ -26,11 +26,11 @@ ifdef CROSS_COMPILING
# build system is not MS Windows when cross-compiling
mkpath = $(1):$(2)
else
ifeq ($(wildcard $(TOOLSDIR)/g.echo$(EXE)),)
ifeq ($(wildcard $(UTILSDIR)/g.echo$(EXE)),)
# dummy path until g.echo.exe gets compiled and is needed
mkpath = $(1);$(2)
else
mkpath = $(shell $(TOOLSDIR)/g.echo$(EXE) $(1));$(2)
mkpath = $(shell $(UTILSDIR)/g.echo$(EXE) $(1));$(2)
endif
endif
else
Expand Down
2 changes: 1 addition & 1 deletion raster/r.colors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ default: multi thumbnails

thumbnails: $(BIN)/r.mapcalc$(EXE) $(BIN)/r.colors$(EXE) $(HTMLDIR)/colortables
ifndef CROSS_COMPILING
-$(call run_grass, $(GRASS_HOME)/tools/thumbnails.py)
-$(call run_grass, $(GRASS_HOME)/utils/thumbnails.py)
endif

$(HTMLDIR)/colortables: $(HTMLDIR)
Expand Down
6 changes: 3 additions & 3 deletions tools/Makefile → utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ SUBDIRS = timer g.html2man
include $(MODULE_TOPDIR)/include/Make/Dir.make
include $(MODULE_TOPDIR)/include/Make/Compile.make

default: parsubdirs $(TOOLSDIR)/mkhtml.py $(TOOLSDIR)/g.echo$(EXE)
default: parsubdirs $(UTILSDIR)/mkhtml.py $(UTILSDIR)/g.echo$(EXE)

$(TOOLSDIR)/mkhtml.py: mkhtml.py
$(UTILSDIR)/mkhtml.py: mkhtml.py
$(INSTALL) $< $@

$(TOOLSDIR)/g.echo$(EXE): $(OBJDIR)/g.echo.o
$(UTILSDIR)/g.echo$(EXE): $(OBJDIR)/g.echo.o
$(call linker_base,$(LINK),$(LDFLAGS) $(EXTRA_LDFLAGS),$(MANIFEST_OBJ))
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/dep_tree2sql.sh → utils/dep_tree2sql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# From: Glynn Clements <glynn at gclements.plus.com>
# Date: Mon, 12 Jun 2006 13:00:25 +0100
#
# Usage: after having compiled GRASS, run "tools/dep_tree2sql.sh `pwd`" from the
# Usage: after having compiled GRASS, run "utils/dep_tree2sql.sh `pwd`" from the
# top of the GRASS source tree.
#
# Essentially, the script runs "nm" on every object file, library and
Expand Down
2 changes: 1 addition & 1 deletion tools/fix_typos.sh → utils/fix_typos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://trac.osgeo.org/gdal/browser/trunk/gdal/scripts/fix_typos.sh
#
# Run in main source code directory of GRASS GIS:
# sh tools/fix_typos.sh
# sh utils/fix_typos.sh
#
#
###############################################################################
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tools/g.html2man/Makefile → utils/g.html2man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ MODULE_TOPDIR = ../..

include $(MODULE_TOPDIR)/include/Make/Other.make

TARGETS := $(patsubst %.py,$(TOOLSDIR)/%.py,ghtml.py ggroff.py g.html2man.py)
TARGETS := $(patsubst %.py,$(UTILSDIR)/%.py,ghtml.py ggroff.py g.html2man.py)

default: $(TARGETS)

$(TOOLSDIR)/g.html2man.py: g.html2man.py
$(UTILSDIR)/g.html2man.py: g.html2man.py
$(INSTALL) $< $@

$(TOOLSDIR)/%.py: %.py
$(UTILSDIR)/%.py: %.py
$(INSTALL_DATA) $< $@
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tools/grass_indent_ALL.sh → utils/grass_indent_ALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# HANDLE WITH CARE
# loops over entire GRASS source code tree and indents source code according to SUBMITTING rules

#are we in the tools/ dir? We should not.
if [ ! -d tools ] ; then
#are we in the utils/ dir? We should not.
if [ ! -d utils ] ; then
echo "ERROR: this script must be run from the main GRASS source code directory" >&2
exit 1
fi

echo "Indenting *.c and *.h..." >&2
find . -type f -name "*.[ch]" -print0 | xargs -0 ./tools/grass_indent.sh
find . -type f -name "*.[ch]" -print0 | xargs -0 ./utils/grass_indent.sh
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/module_synopsis.sh → utils/module_synopsis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#############################################################################
#
# PDF output requires the Palatino font.
# Run this script from the tools/ directory in the souce code.
# Run this script from the utils/ directory in the source code.
# (TeX needs to be able to find grasslogo_vector.pdf)
#

Expand Down Expand Up @@ -190,7 +190,7 @@ sort "$TMP" > "$SYNOP"
cp "$SYNOP" "${TMP}.txt"

####### create HTML source #######
# poor cousin to full_index.html from tools/build_html_index.sh
# poor cousin to full_index.html from build_html_index.sh
# todo $MODULE.html links
g.message "Generating HTML (writing to \$GISBASE/docs/html/) ..."

Expand Down
2 changes: 1 addition & 1 deletion tools/pep8config.txt → utils/pep8config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This configuration should work for all Python library, Python scripts and
# wxPython GUI.
# Example for gui/wxpython:
# pep8 --config=../../tools/pep8config.txt lmgr/
# pep8 --config=../../utils/pep8config.txt lmgr/

# A lot of errors need to be ignored now to avoid a large number of messages.
# Files need to be fixed one by one (without this configuration).
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/pylintrc.txt → utils/pylintrc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This configuration should work for all Python library, Python scripts and
# wxPython GUI.
# Example for gui/wxpython:
# pylint --rcfile=../../tools/pylintrc.txt -f parseable -r n -i y lmgr/
# pylint --rcfile=../../utils/pylintrc.txt -f parseable -r n -i y lmgr/

# A lot of errors need to be ignored now to avoid a large number of messages.
# Files need to be fixed one by one (partially without this configuration).
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion vector/v.colors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include $(MODULE_TOPDIR)/include/Make/Module.make
default: cmd

thumbnails: $(BIN)/r.mapcalc$(EXE)
-$(call run_grass, $(GRASS_HOME)/tools/thumbnails.py)
-$(call run_grass, $(GRASS_HOME)/utils/thumbnails.py)

.PHONY: thumbnails

Expand Down