How to build and install gshhg-gmt from its repo?

I’m building gmt-6.30 from source on ubuntu 20.04, and I’m following the gmt build instructions.
That documentation refers to git repo gshhg-gmt which I have cloned. But instructions for building or installing the files in INSTRUCTIONS.txt or README.md. The repo contains these files:
ChangeLog GSHHS INSTRUCTIONS.TXT Makefile README.md src WDBII
config.mk.orig guru LICENSE make.out SHAPEFILES.TXT to_add

What do I do with these? Typing ‘make’ in the directory immediately gives an error:
$ make
Makefile:35: /src/common.mk: No such file or directory
make: *** No rule to make target ‘/src/common.mk’. Stop.
Any advice is much appreciated!

The GMT document is somewhat confusing on how to install GSHHG and DCW.
The Required support data section says:
You also need to download support data:

* [GSHHG](https://github.com/GenericMappingTools/gshhg-gmt): A Global Self-consistent, Hierarchical, High-resolution Geography Database (>=2.2.0)
* [DCW](https://github.com/GenericMappingTools/dcw-gmt): The Digital Chart of the World (optional, >=2.0.0)

Those two links point to GSHHG and DCW github repos - I cloned those but they don’t contain information on how to build the needed .nc files (not that I could find anyway). Further down in the document it says:
You can also get supporting data GSHHG and DCW (filename: gshhg-gmt-x.x.x.tar.gz and dcw-gmt-x.x.x.tar.gz) from the [GMT main site](https://www.generic-mapping-tools.org/download/#support-data)

The “Support data” section on that page references *.tar.gz files for GSHHG and DCW that actually do contain the needed .nc files. I suggest the GMT team clarify the documents a bit - would save lots of time.
Thanks!

You dont have to manually get dcw and gshhg anymore. Gmt will fetch it for you when needed.

If I remember correctly;

Install the dependencies, clone the gmt repo and

  • cd gmt
  • mkdir build
  • cd build
  • cmake .. [-DCMAKE_INSTALL_PREFIX=/opt/gmt -DGSHHG_ROOT=/path/to/gshhg -DDCW_ROOT=/path/to/dcw]
  • cmake --build .
  • cmake --build . —target install

Which should give you a freshly baked gmt.