From 4d589237eed4d942b4d6b8e890e92d7c6143cbe6 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Sun, 26 Nov 2023 18:31:10 -0800 Subject: [PATCH] Add ability to compile with -DMAIKO_ENABLE_NETHUB --- .github/workflows/Dockerfile_maiko | 2 +- bin/makeright | 31 ++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Dockerfile_maiko b/.github/workflows/Dockerfile_maiko index 5f9cd45b..09e0cd92 100755 --- a/.github/workflows/Dockerfile_maiko +++ b/.github/workflows/Dockerfile_maiko @@ -18,7 +18,7 @@ COPY . ${INSTALL_LOCATION} # Build maiko RUN cd ${INSTALL_LOCATION}/bin \ && ./makeright x cleanup \ - && ./makeright x + && ./makeright x nethub RUN cd ${INSTALL_LOCATION}/bin \ && if [ "$(./machinetype)" = "x86_64" ]; then \ ./makeright init; \ diff --git a/bin/makeright b/bin/makeright index 1fde522a..27fcb1ae 100755 --- a/bin/makeright +++ b/bin/makeright @@ -20,7 +20,7 @@ # Nov 20 2001 JDS: Convert to use BASH, not CSH, for open-source... # # usage: makeright [display-option] [other-option] -# +# # example: makeright single ; make lde for mmaped displayFB # makeright multi ; make lde for cg3,cg6 # makeright x ; make lde for X-windows @@ -33,27 +33,41 @@ # # makeright init requires directory "maiko/init.${architecture} # -# Note: X11R4 environment link shared libraries. -# lde need X library. If lde links shared libraries, +# Note: X11R4 environment link shared libraries. +# lde need X library. If lde links shared libraries, # X shared libraries are needed at run time. # # Hide X shared libraries from link libraries search path. -LD_LIBRARY_PATH=/usr/local/lib +LD_LIBRARY_PATH=/usr/local/lib export PATH=".:$PATH" +noshift="false" if test "$1" = "" then display="single" + noshift="true" +elif test "$1" = "nethub" + then + display="single" + noshift="true" else display="$1" + noshift="false" fi -if test $# -gt 0 +if test "$noshift" = "false" then shift fi +nethub="false" +if test "$1" = "nethub" + then + nethub="true" + shift +fi + architecture=`machinetype` osversion=`osversion` echo "making so far for ${osversion} on ${architecture}." @@ -101,7 +115,12 @@ echo start making lde for ${releasename}. # then finally do the make, including the right stuff # With makefile-tail merged, this should only take ONE make command.... +cp -p makefile-${releasename} /tmp/makefile-${releasename}-$$ +if test "$nethub" = "true" + then + sed -e "/^DFLAGS = /s/$/ -DMAIKO_ENABLE_NETHUB/" -i /tmp/makefile-${releasename}-$$ +fi make RELEASENAME=${releasename} LDENAME=${ldename} \ OSARCHNAME=${osversion}.${architecture} \ - -f makefile-header -f makefile-${releasename} \ + -f makefile-header -f /tmp/makefile-${releasename}-$$ \ -f makefile-tail $*