From ad54938112239474b5a57bd8e44659972478f029 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Fri, 29 Mar 2024 20:11:05 -0600 Subject: [PATCH 1/4] Automatically set SERA_HOME for fullbuild. --- sera1/fullbuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sera1/fullbuild b/sera1/fullbuild index 49f564f..42a1845 100755 --- a/sera1/fullbuild +++ b/sera1/fullbuild @@ -1,5 +1,8 @@ #!/bin/sh - +SERA_HOME=`dirname $0` +cd $SERA_HOME +export SERA_HOME=`pwd` +echo SERA_HOME=$SERA_HOME touch $SERA_HOME/config/Local.def imake -I./config make Makefile From 6e70ff02ecffaf8cc0e3701158a6d4d6604e57b2 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Fri, 29 Mar 2024 20:12:54 -0600 Subject: [PATCH 2/4] Adding initial ci build file. --- .github/workflows/build.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..440f1e4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: install + run: sudo apt-get install libmotif-dev libxpm-dev gfortran xutils-dev libglx-dev libgl-dev libxmu-dev libglu1-mesa-dev libxi-dev + - name: build + run: cd sera1 && ./fullbuild From 7b240147e473593368adda565084a58eaed28344 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Tue, 26 Mar 2024 06:10:44 -0600 Subject: [PATCH 3/4] Removing -lXp because this is for printing and we don't use it. --- sera1/config/linux.cf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sera1/config/linux.cf b/sera1/config/linux.cf index 58d52e0..f83836c 100644 --- a/sera1/config/linux.cf +++ b/sera1/config/linux.cf @@ -417,7 +417,7 @@ EXTRA_X_LIBS = -lXmu -lXt -lSM -lICE -lXext -lXintl -lXi -lX11 #else #define StandardIncludes -I/usr/X11R6/include -I$(TOP)/Shared/include #define ExtraLibraries -L/usr/X11R6/lib -L$(TOP)/Shared/lib -EXTRA_X_LIBS = -lXmu -lXt -lSM -lICE -lXext -lXp -lXi -lX11 +EXTRA_X_LIBS = -lXmu -lXt -lSM -lICE -lXext -lXi -lX11 #endif XCOMM Location for libraries built withing the project. From 383bf68a3a2827244236a143ad290a96717b47cf Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Mon, 25 Mar 2024 20:53:06 -0600 Subject: [PATCH 4/4] Changing make all to fail if one of the substeps fails. --- .github/workflows/build.yml | 2 ++ sera1/Imakefile | 2 +- sera1/config/Imake.rules | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 440f1e4..7b9f6c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,3 +17,5 @@ jobs: run: sudo apt-get install libmotif-dev libxpm-dev gfortran xutils-dev libglx-dev libgl-dev libxmu-dev libglu1-mesa-dev libxi-dev - name: build run: cd sera1 && ./fullbuild + - name: make_all + run: cd sera1 && make all diff --git a/sera1/Imakefile b/sera1/Imakefile index 9d3f848..033c257 100644 --- a/sera1/Imakefile +++ b/sera1/Imakefile @@ -9,5 +9,5 @@ Shared Sera3d SeraCalc SeraDose SeraImage \ SeraMC SeraMenu SeraModel SeraPlan SeraPlot \ Util -MakeSubdirs($(SUBDIRS)) +MakeSubdirsOrExit($(SUBDIRS)) DependSubdirs($(SUBDIRS)) diff --git a/sera1/config/Imake.rules b/sera1/config/Imake.rules index d982745..4295433 100644 --- a/sera1/config/Imake.rules +++ b/sera1/config/Imake.rules @@ -1836,6 +1836,21 @@ name:: @@\ done #endif +/* + * MakeSubdirsOrExit - recursively make a series of steps and exit if one + * fails. + */ +#ifndef MakeSubdirsOrExit +#define MakeSubdirsOrExit(dirs) @@\ +all:: @@\ + @MakeFlagsToShellFlags(ik,set +e); \ @@\ + for i in dirs ;\ @@\ + do \ @@\ + echo "making all in $(CURRENT_DIR)/$$i..."; \ @@\ + (cd $$i && $(MAKE) $(MFLAGS) PassCDebugFlags all) || exit -1; \ @@\ + done +#endif + /* * NamedMakeSubdirs - generate rules to do makes in the given subdirectories.