diff --git a/Makefile.am b/Makefile.am index cb74b1bbb..536055196 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 @@ -50,6 +52,7 @@ 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 = @@ -57,6 +60,7 @@ CLEANFILES = EXTRA_DIST = dist_pkgdata_DATA = requirements.txt pkgdata_DATA = +pkginclude_HEADERS = noinst_LTLIBRARIES = pkglib_LTLIBRARIES = bin_PROGRAMS = @@ -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 diff --git a/build.sh b/build.sh index 9cdac8528..011553139 100755 --- a/build.sh +++ b/build.sh @@ -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" diff --git a/configure.ac b/configure.ac index 2d33ffc5c..73bffe504 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) ############################################################################### diff --git a/python/Makefile.mk b/python/Makefile.mk index df8b86006..cb8470dbe 100644 --- a/python/Makefile.mk +++ b/python/Makefile.mk @@ -29,3 +29,5 @@ python-uninstall: @rm -rf $(PYPKG)* BUILT_SOURCES += python-install + +pkginclude_HEADERS += $(wildcard $(top_srcdir)/python/*.h) diff --git a/source/Makefile.mk b/source/Makefile.mk index 5e53956b0..a34ce32dc 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -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