Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Building Guide

David P. Chassin edited this page Mar 8, 2022 · 4 revisions

This build guide is intended for developers who will be frequently building and debugging multiple versions of HiPAS GridLAB-D on their systems.

Build files and Folders

HiPAS GridLAB-D uses autotools to configure and build gridlabd. Aside from the required build files Makefile.am and configure.ac a number of ancillary files and folders are also used during the configure and make processes.

Build support folders

  • .github/: This folder contains the files needed by GitHub to run automated actions. It also contains the issues template.

  • build_aux/: This folder contains a version identification script use by make and platform-specific setup scripts used by install.sh.

  • docker/: This folder contains the files need to build docker images.

  • `m4/': This folder contains the autom4te files needed to build required libraries and packages, including SuperLU, Xerces, Doxygen, Pthread, and Curses.

  • third_party/: This folder contains the third-party libraries needed to build gridlabd.

  • utilities/: This folder contains support utilities used by configure and make to build gridlabd.

Build support files

  • am include.mk: This file contains automake rules for components in GridLAB-D.

  • checkpkgs: This script is used to verify that the directories list in Makefile.am are ready for use by autoreconf.

  • configure.ac: This file is the main autoconf configuration control file for GridLAB-D.

  • configure.opt: This file contains the default configuration options used when running configure.

  • custom.mk: The file contains the list of optional modules enabled when building GridLAB-D.

  • customize: This script controls the options used by the configure script.

  • gldmake: This script provides a shell menu-based build environment.

  • gridlabd.spec.in: This file contains the configure specification for the GridLAB-D application

  • install.conf-default: This file contains the default options for the install.sh setup script.

  • install.sh: This script is used to install GridLAB-D on a new system.

  • Makefile.am: This file contains the main makefile template for GridLAB-D.

  • modules.mk: This file contains a list of the modules that must be built for a complete GridLAD-B installation

  • requirements.txt: This file contains the Python modules and versions required by GridLAB-D.

Other build files

  • .../Makefile.mk: Many folders include Makefile.mk which will be consulted when make is run.

  • .../requirements.txt: All files named requirements.txt will be consulted when python is updated.

Make targets

There are many targets support by make. To get a comprehensive list, use make help. The most important targets are the following:

  • install: This target installs gridlabd in the target folder. By default, the target folder is /usr/local/opt/gridlabd/VERSION-BUILD-BRANCH. Use the --prefix=FOLDER to change the target folder.

  • system: This target install gridalbd in the target folder and link the system files to that target so all users will have access to it from the /usr/local/bin/gridlabd.

  • clean: This target removes all the intermediate files created during a build.

  • clean-wc: This target removes all the untracked files in the source tree.

  • reconfigure: This target regenerates and runs the configure file after the branch name has changed. This is necessary before using make system to avoid target folder inconsistencies due to the change in the branch name.

Selecting versions and platforms

HiPAS GridLAB-D includes a version control subcommand that allow developers to quickly change the version in use by the system.

  • Show the current version: gridlabd version show

  • Obtain a list of installed versions: gridlabd version list

  • Set the version for the system: gridlabd version set NAME

  • Remove a version from the system: gridlabd version delete NAME

Clone this wiki locally