add element for adding make code for dependencies

Sat, 03 Aug 2019 09:45:30 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 03 Aug 2019 09:45:30 +0200
changeset 2
14a4b7f0bc74
parent 1
c393cdf57f2e
child 3
9d60baefa4ed

add element for adding make code for dependencies

test/config.mk file | annotate | diff | comparison | revisions
test/configure file | annotate | diff | comparison | revisions
test/make/configure.vm file | annotate | diff | comparison | revisions
test/make/project.xml file | annotate | diff | comparison | revisions
--- a/test/config.mk	Mon Feb 04 18:40:33 2019 +0100
+++ b/test/config.mk	Sat Aug 03 09:45:30 2019 +0200
@@ -6,6 +6,13 @@
 include $(BUILD_ROOT)make/gcc.mk
 
 
-DAV_CFLAGS  +=   -I/usr/include/libxml2 -DTEST -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -pthread 
-DAV_LDFLAGS +=  -lcurl  -lxml2  -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype 
+
+DAV_CFLAGS  +=   -I/usr/include/libxml2 -DTEST
+DAV_LDFLAGS +=  -lcurl  -lxml2 
 
+MVAR = 123
+MVAR += 123
+
+
+
+
--- a/test/configure	Mon Feb 04 18:40:33 2019 +0100
+++ b/test/configure	Sat Aug 03 09:45:30 2019 +0200
@@ -238,6 +238,9 @@
         if [ $? -ne 0 ]; then
         	break
         fi
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -256,6 +259,9 @@
         fi
         CFLAGS+="-I/mingw/include"    
         LDFLAGS+="-lcurl"    
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -278,6 +284,9 @@
         else
             break
         fi
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -293,6 +302,9 @@
         fi
         CFLAGS+=" `pkg-config --cflags libcurl`"
         LDFLAGS+=" `pkg-config --libs libcurl`"
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -314,6 +326,9 @@
         fi
         CFLAGS+=" `pkg-config --cflags sqlite3`"
         LDFLAGS+=" `pkg-config --libs sqlite3`"
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -328,6 +343,9 @@
     while true
     do
         CFLAGS+="-DTEST"    
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -349,6 +367,9 @@
         fi
         CFLAGS+=" `pkg-config --cflags gtk+-2.0`"
         LDFLAGS+=" `pkg-config --libs gtk+-2.0`"
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -370,6 +391,9 @@
         fi
         CFLAGS+=" `pkg-config --cflags gtk+-5.0`"
         LDFLAGS+=" `pkg-config --libs gtk+-5.0`"
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -391,6 +415,9 @@
         fi
         CFLAGS+=" `pkg-config --cflags libxml-2.0`"
         LDFLAGS+=" `pkg-config --libs libxml-2.0`"
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -401,6 +428,35 @@
 
 DEPENDENCIES_FAILED=
 ERROR=0
+# general dependencies
+CFLAGS=
+LDFLAGS=
+while true
+do
+    while true
+    do
+        
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$dependency.make
+__EOF__
+        
+        break
+    done
+    
+    break
+done
+
+# add general dependency flags to config.mk
+echo >> $TEMP_DIR/config.mk
+if [[ ! -z ${CFLAGS} ]]; then
+    echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
+fi
+if [[ ! -z ${CXXFLAGS} ]]; then
+    echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
+fi
+if [[ ! -z ${LDFLAGS} ]]; then
+    echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
+fi
 
 #
 # OPTION VALUES
--- a/test/make/configure.vm	Mon Feb 04 18:40:33 2019 +0100
+++ b/test/make/configure.vm	Sat Aug 03 09:45:30 2019 +0200
@@ -287,6 +287,9 @@
         	break
         fi
         #end
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$sub.make
+__EOF__
         echo yes
         return 0
     done
@@ -344,6 +347,9 @@
         $flags.varName+="$flags.value"    
         #end
         #end
+		cat >> $TEMP_DIR/make.mk << __EOF__
+$dependency.make
+__EOF__
         
         break
     done
--- a/test/make/project.xml	Mon Feb 04 18:40:33 2019 +0100
+++ b/test/make/project.xml	Sat Aug 03 09:45:30 2019 +0200
@@ -29,6 +29,12 @@
 	<dependency name="qt4">
 		<test>which qmake-qt4</test>
 	</dependency>
+	
+	<dependency>
+		<make>MVAR = 123</make>
+		<make>MVAR += 123</make>
+	</dependency>
+	
 	<target name="dav">
 		<feature name="db" default="on">
 			<dependencies>sqlite</dependencies>

mercurial