aboutsummaryrefslogtreecommitdiff
path: root/print/pdftk/files/patch-java_libs__gnu__gcj__convert__Makefile
blob: 09005f66578e34fc815faeb140a620b7434a73ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- ./java_libs/gnu/gcj/convert/Makefile.orig	2006-07-26 17:13:44.000000000 -0400
+++ ./java_libs/gnu/gcj/convert/Makefile	2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
 objects= $(patsubst %.java, %.o, $(sources))
 headers= $(patsubst %.java, %.h, $(sources))
 classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
 
 ##
 # implicit rules for creating A from B
 
 %.o : %.java
 	$(GCJ) $(GCJFLAGS) -c $< -o $@
+	${OBJCOPY} -L '_ZGr8_$$_dummy' $@
 
 %.class : %.java
 	$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
 
 ##
 # targets
 
 all : $(library) $(headers)
 
+$(headers): $(classes)
+
 $(library) : $(objects)
 	$(AR) $(ARFLAGS) $(library) $(objects);