SF.net SVN: gar:[23273] csw/mgar/gar/v2/go/Makefile

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Mar 23 15:50:58 CET 2014


Revision: 23273
          http://sourceforge.net/p/gar/code/23273
Author:   wahwah
Date:     2014-03-23 14:50:58 +0000 (Sun, 23 Mar 2014)
Log Message:
-----------
cat-gen: Hack the Makefile to compile

Looks like there are differences in how gccgo looks for packages in comparison
to the mainstream go command. I used truss to see where gccgo looks for the
binary object and I symlinked the needed one. This is probably not the best
way to do it, but all the information I could find on stack overflow would
advice me to use the "go" command which we do not have and will not have until
someone ports it.

Modified Paths:
--------------
    csw/mgar/gar/v2/go/Makefile

Modified: csw/mgar/gar/v2/go/Makefile
===================================================================
--- csw/mgar/gar/v2/go/Makefile	2014-03-23 14:50:51 UTC (rev 23272)
+++ csw/mgar/gar/v2/go/Makefile	2014-03-23 14:50:58 UTC (rev 23273)
@@ -8,11 +8,17 @@
 bin:
 	mkdir -p bin
 
-bin/catalog-release-to-disk: src/catalog-release-to-disk/catalog-release-to-disk.go
-	gccgo -g -o $@ $<
+bin/catalog-release-to-disk: src/catalog-release-to-disk/catalog-release-to-disk.o src/opencsw/diskformat/diskformat.o
+	gccgo -g -o $@ $?
 
-# catalog-release-to-disk: catalog-release-to-disk.o
-# 	gccgo -o $@ $<
+# This is a poor hack, but it gets it to compile.
+src/catalog-release-to-disk/catalog-release-to-disk.o: src/opencsw/diskformat/diskformat.o
+	mkdir -p opencsw
+	ln -sf ../src/opencsw/diskformat/diskformat.o opencsw/diskformat.o
+	gccgo -o $@ -g -c src/catalog-release-to-disk/catalog-release-to-disk.go
 
-# %.o: %.go
-# 	gccgo -c $<
+%.o: %.go
+	gccgo -o $@ -g -c $<
+
+clean:
+	rm -f src/opencsw/diskformat/diskformat.o bin/catalog-release-to-disk

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list