Make.proto
changeset 29 44bc6c85f95a
parent 23 b894e51653f4
child 31 035449621a0c
--- a/Make.proto	Wed Feb 22 12:45:16 2012 +0000
+++ b/Make.proto	Thu Mar 29 17:44:54 2012 +0000
@@ -1,7 +1,7 @@
 # $Header$
 #
 # DO NOT EDIT
-# automagically generated from the projectDefinition: stx_libwebkit.
+# automagically generated from the projectDefinition: stx_libwebkit at 2012-03-29 18:45:35.947.
 #
 # Warning: once you modify this file, do not rerun
 # stmkmp or projectDefinition-build again - otherwise, your changes are lost.
@@ -44,7 +44,7 @@
 LOCALDEFINES=
 
 LIBNAME=libstx_libwebkit
-STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H.  -varPrefix=$(LIBNAME)
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
 
 
 # ********** OPTIONAL: MODIFY the next line ***
@@ -63,7 +63,7 @@
 
 all:: preMake classLibRule postMake
 
-pre_objs:: WebKitRenderer.$(shell uname -m)  update-svn-revision
+pre_objs:: WebKitRenderer.$(shell uname -m) 
 
 
 WebKitRenderer.$(shell uname -m): uzbl/uzbl-core
@@ -72,13 +72,32 @@
 uzbl/uzbl-core:
 	$(MAKE) -C uzbl uzbl-core
 
-update-svn-revision:
-	if [ ! -r .svnversion -o "$(shell svnversion -n)" != "$(shell cat .svnversion)" ]; then \
-		svnversion -n > .svnversion; \
-		sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"'$(shell svnversion -n)'\"\$$\"/g" \
-			stx_libwebkit.st; \
+clean::
+	$(MAKE) -C uzbl clean
+	rm WebKitRenderer.$(shell uname -m)
+
+
+
+# Update SVN revision in stx_libbasic3.st
+ifneq (,$(findstring .svn,$(wildcard .svn)))
+.svnversion: *.st
+	if [ -d .svn ]; then \
+		rev=$(shell svnversion -n); \
+		echo -n $$rev > .svnversion; \
+	else \
+		echo -n exported > .svnversion; \
 	fi
-.PHONY: update-svn-revision
+
+stx_libwebkit.o: stx_libwebkit.st .svnversion 
+	if [ -d .svn ]; then \
+		rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \
+		sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\'$$rev2\'\"\$$\"/g" $< > .stx_libwebkit.svn.st; \
+	fi
+	$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.stx_libwebkit.svn $(O_RULE);
+	mv .stx_libwebkit.svn.$(O) stx_libwebkit.$(O) 
+endif
+
+
 
 
 # add more install actions here
@@ -105,6 +124,7 @@
 
 
 cleanjunk::
+	-rm -f *.s *.s2
 
 clean::
 	-rm -f *.o *.H