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

Commit

Permalink
Add headers and source to build target (#1336)
Browse files Browse the repository at this point in the history
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
  • Loading branch information
dchassin authored Sep 22, 2023
1 parent 7aa7146 commit 650e62c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
13 changes: 12 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Authors:
# DP Chassin (dchassin@slac.stanford.edu)

.SILENT:

$(info Current target is $(shell $(top_srcdir)/build-aux/version.sh --name))

# !!! must match version specified in configure.ac
Expand Down Expand Up @@ -50,13 +52,15 @@ AM_LDFLAGS += -module
AM_LDFLAGS += -avoid-version
AM_LDFLAGS += -export-dynamic
AM_LDFLAGS += $(GLD_LDFLAGS) -lpython$(PYVER)
AM_LIBTOOLFLAGS = --quiet

# makefile fragments populate these variables
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
dist_pkgdata_DATA = requirements.txt
pkgdata_DATA =
pkginclude_HEADERS =
noinst_LTLIBRARIES =
pkglib_LTLIBRARIES =
bin_PROGRAMS =
Expand Down Expand Up @@ -291,11 +295,18 @@ $(PREFIX)/docker.img: docker/Dockerfile Makefile
@mkdir -p $(prefix)
docker save $(PACKAGE)/$(PACKAGE_VERSION)-$(PACKAGE_BRANCH):latest -o $(prefix)/docker.img

system: python-install install
system: python-install install $(prefix)/src
@echo "Setting $$($(top_srcdir)/build-aux/version.sh --install) to the current system version"
@$(prefix)/bin/gridlabd version set
@test "$$(gridlabd --version=install)" = "$$($(top_srcdir)/build-aux/version.sh --install)" || echo 'WARNING : build and install versions differ; use build `--clean` option to fix this problem'

$(prefix)/src:
@echo Copying source files to $@...
@mkdir -p $(prefix)/src/source $(prefix)/src/python
@cp $(top_srcdir)/source/*.cpp $(prefix)/src/source
@cp $(top_srcdir)/python/*.cpp $(prefix)/src/python
@chmod -R 555 $(prefix)/src

index: weather library template

html-local: module-html developer-html troubleshooting-html
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test -f $HOME/.gridlabd/bin/activate || error "$HOME/.gridlabd is not found. Run
test ! -z "$VIRTUAL_ENV" || . $HOME/.gridlabd/bin/activate 1>$STDOUT 2>$STDERR
test ! -z "$VIRTUAL_ENV" || error "unable to activate gridlabd venv"
test -f ./configure || autoreconf -isf 1>$STDOUT 2>$STDERR || error "autoconf failed"
test -f Makefile || ./configure $CONFIGURE 1>$STDOUT 2>$STDERR || error "./configure failed"
test -f Makefile || ./configure --enable-silent-rules $CONFIGURE 1>$STDOUT 2>$STDERR || error "./configure failed"
make $MAKEFLAGS $TARGET 1>$STDOUT 2>$STDERR || error "unable to make build"
if [ ! -z "$VERIFY" ]; then
$(build-aux/version.sh --install)/bin/gridlabd $VERIFY 1>$STDOUT 2>$STDERR || error "unable to verify install"
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ AC_CONFIG_AUX_DIR([build-aux])
###############################################################################
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])
AM_SILENT_RULES([yes])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
###############################################################################
Expand Down
2 changes: 2 additions & 0 deletions python/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ python-uninstall:
@rm -rf $(PYPKG)*

BUILT_SOURCES += python-install

pkginclude_HEADERS += $(wildcard $(top_srcdir)/python/*.h)
16 changes: 1 addition & 15 deletions source/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,7 @@ gridlabd_bin_SOURCES += $(top_srcdir)/source/build.h
BUILT_SOURCES += $(top_srcdir)/source/build.h
CLEANFILES += $(top_srcdir)/source/build.h origin.txt

pkginclude_HEADERS =
pkginclude_HEADERS += $(top_srcdir)/source/build.h
pkginclude_HEADERS += source/class.h
pkginclude_HEADERS += source/complex.h
pkginclude_HEADERS += source/debug.h
pkginclude_HEADERS += source/enduse.h
pkginclude_HEADERS += source/exception.h
pkginclude_HEADERS += source/loadshape.h
pkginclude_HEADERS += source/lock.h
pkginclude_HEADERS += source/module.h
pkginclude_HEADERS += source/object.h
pkginclude_HEADERS += source/property.h
pkginclude_HEADERS += source/schedule.h
pkginclude_HEADERS += source/test.h
pkginclude_HEADERS += source/version.h
pkginclude_HEADERS += $(wildcard $(top_srcdir)/source/*.h)

gridlabddir = $(prefix)/share/gridlabd
gridlabd_DATA = origin.txt
Expand Down

0 comments on commit 650e62c

Please sign in to comment.