merge

Sun, 16 Apr 2023 14:17:08 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 16 Apr 2023 14:17:08 +0200
changeset 20
2d3fe2c44163
parent 19
e05f3e8ec2cb (current diff)
parent 18
0df7309d498e (diff)
child 21
34ebff7ddd43

merge

test/configure file | annotate | diff | comparison | revisions
--- a/dist/bin/uwproj	Sun Apr 16 14:16:31 2023 +0200
+++ b/dist/bin/uwproj	Sun Apr 16 14:17:08 2023 +0200
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PREFIX=/usr
+PREFIX=%%PREFIX%%
 
 java -jar $PREFIX/lib/uwproj/uwproj-0.1.jar "$@"
 if [ $? -eq 0 ]; then
--- a/dist/install.sh	Sun Apr 16 14:16:31 2023 +0200
+++ b/dist/install.sh	Sun Apr 16 14:17:08 2023 +0200
@@ -1,11 +1,35 @@
 #!/bin/sh
 
+PREFIX=/usr/local
+
+# help text
+printhelp()
+{
+	echo "Usage: $0 [PREFIX=<path>]"
+	echo
+	echo "Default PREFIX:" $PREFIX
+}
+
+#
+# parse arguments 
+#
+for ARG in $@
+do
+    case "$ARG" in
+		"PREFIX="*)         PREFIX=${ARG#PREFIX=} ;;
+		"--help"*)          printhelp; exit 1 ;;
+		"-"*) echo "unknown option: $ARG"; exit 1 ;;
+	esac
+done
+
+
 echo "mkdir -p /usr/lib/uwproj"
-mkdir -p /usr/lib/uwproj
+mkdir -p $PREFIX/lib/uwproj
 
 echo "cp ../target/uwproj-0.1-jar-with-dependencies.jar /usr/lib/uwproj/uwproj-0.1.jar"
-cp ../target/uwproj-0.1-jar-with-dependencies.jar /usr/lib/uwproj/uwproj-0.1.jar
+cp ../target/uwproj-0.1-jar-with-dependencies.jar $PREFIX/lib/uwproj/uwproj-0.1.jar
 
 echo "cp bin/uwproj /usr/bin"
-cp bin/uwproj /usr/bin
+sed s:%%PREFIX%%:$PREFIX:g bin/uwproj > $PREFIX/bin/uwproj
 
+
--- a/test/config.mk	Sun Apr 16 14:16:31 2023 +0200
+++ b/test/config.mk	Sun Apr 16 14:17:08 2023 +0200
@@ -3,33 +3,33 @@
 #
 
 # general vars
-HOST=x8
-PREFIX=/export/home/olaf/Projekte/uwproj/test/work
-INSTALL_DIR=/export/home/olaf/Projekte/uwproj/test/work
+HOST=m2.fritz.box
+PREFIX=/Users/olaf/Projekte/uwproj/test/work
+INSTALL_DIR=/Users/olaf/Projekte/uwproj/test/work
 
-EPREFIX=/export/home/olaf/Projekte/uwproj/test/work
+EPREFIX=/Users/olaf/Projekte/uwproj/test/work
 
-BINDIR=/export/home/olaf/Projekte/uwproj/test/work/bin
-SBINDIR=/export/home/olaf/Projekte/uwproj/test/work/sbin
-LIBDIR=/export/home/olaf/Projekte/uwproj/test/work/lib
-LIBEXECDIR=/export/home/olaf/Projekte/uwproj/test/work/libexec
-DATADIR=/export/home/olaf/Projekte/uwproj/test/work/share
-SYSCONFDIR=/export/home/olaf/Projekte/uwproj/test/work/etc
-SHAREDSTATEDIR=/export/home/olaf/Projekte/uwproj/test/work/com
-LOCALSTATEDIR=/export/home/olaf/Projekte/uwproj/test/work/var
-INCLUDEDIR=/export/home/olaf/Projekte/uwproj/test/work/include
-INFODIR=/export/home/olaf/Projekte/uwproj/test/work/info
-MANDIR=/export/home/olaf/Projekte/uwproj/test/work/man
+BINDIR=/Users/olaf/Projekte/uwproj/test/work/bin
+SBINDIR=/Users/olaf/Projekte/uwproj/test/work/sbin
+LIBDIR=/Users/olaf/Projekte/uwproj/test/work/lib
+LIBEXECDIR=/Users/olaf/Projekte/uwproj/test/work/libexec
+DATADIR=/Users/olaf/Projekte/uwproj/test/work/share
+SYSCONFDIR=/Users/olaf/Projekte/uwproj/test/work/etc
+SHAREDSTATEDIR=/Users/olaf/Projekte/uwproj/test/work/com
+LOCALSTATEDIR=/Users/olaf/Projekte/uwproj/test/work/var
+INCLUDEDIR=/Users/olaf/Projekte/uwproj/test/work/include
+INFODIR=/Users/olaf/Projekte/uwproj/test/work/info
+MANDIR=/Users/olaf/Projekte/uwproj/test/work/man
 
 # toolchain
 CC = clang
-CXX = clang++
+CXX = g++
 LD = clang
 
 include $(BUILD_ROOT)/make/clang.mk
 
 
 
-CFLAGS  +=  -I/usr/local/include/libxml2 
-LDFLAGS +=  -L/usr/local/lib -lxml2  -lssl -lcrypto
+CFLAGS  +=  -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
+LDFLAGS +=  -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm -lssl -lcrypto
 
--- a/test/configure	Sun Apr 16 14:16:31 2023 +0200
+++ b/test/configure	Sun Apr 16 14:17:08 2023 +0200
@@ -293,6 +293,28 @@
 dependency_libxml2()
 {
     printf "checking for libxml2... "
+    # dependency libxml2 platform="macos"
+    while true
+    do
+    	if isnotplatform "macos"; then
+            break
+        fi
+        xml2-config --cflags > /dev/null
+        if [ $? -eq 0 ]; then
+            CFLAGS="$CFLAGS `xml2-config --cflags`"
+        else
+            break
+        fi
+        xml2-config --libs > /dev/null
+        if [ $? -eq 0 ]; then
+            LDFLAGS="$LDFLAGS `xml2-config --libs`"
+        else
+            break
+        fi
+		echo yes
+        return 0
+    done
+	
     # dependency libxml2 
     while true
     do
--- a/test/make/project.xml	Sun Apr 16 14:16:31 2023 +0200
+++ b/test/make/project.xml	Sun Apr 16 14:17:08 2023 +0200
@@ -12,6 +12,11 @@
 	</dependency>
 
 	<!-- library dependencies -->
+	<dependency name="libxml2" platform="macos">
+		<cflags type="exec">xml2-config --cflags</cflags>
+		<ldflags type="exec">xml2-config --libs</ldflags>
+	</dependency>
+
 	<dependency name="libxml2">
 		<pkgconfig>libxml-2.0</pkgconfig>
 	</dependency>

mercurial