~ljrt-dev/ljrt/ljrt.newjavalib

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
VERSION = 0.91

all:
	cd J2CTranslator && make all

clean:
	cd J2CTranslator && make clean

ZipSelfExtractor.class: ZipSelfExtractor.java
	jikes ZipSelfExtractor.java

# -- Create an executable jar archive --


NAME_VERSION = ljrt-$(VERSION)
JARFILE = $(NAME_VERSION).jar
TARFILE = $(NAME_VERSION).tar.gz
MANIFEST = manifest
SEDARG += -e '/CVS/d'
SEDARG += -e '/.arch-ids/d'
SEDARG += -e '/.arch-inventory/d'
SEDARG += -e '/+build/d'
SEDARG += -e '/swp/d'
SEDARG += -e '/semantic.cache/d'

SEDCMD = sed $(SEDARG)

jar: 	all ZipSelfExtractor.class
	cp J2CTranslator/test/Makefile.skel .
	jar cvmf $(MANIFEST) $(JARFILE) ZipSelfExtractor.class AUTHORS BUGS ChangeLog \
	README NEWS COPYING Makefile.skel \
	J2CTranslator/test/Makefile.skel J2CTranslator/test/Makefile.am.skel \
	J2CTranslator/test/configure.in.skel J2CTranslator/test/make.skel.rules \
	J2CTranslator/test/bootstrap
	find gc -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find javalib -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find docs -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator -name '*.class' -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator/AST -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator/bytecode -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator/parser -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator/test/helloworld -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find J2CTranslator/test/regressiontests -type f | $(SEDCMD) | xargs jar uf $(JARFILE)
	find JavaGrammar/beaver -type f | $(SEDCMD) | xargs jar uf $(JARFILE)



# jar: 	all Install.class ZipSelfExtractor.class
# 	mkdir -p tardir/$(NAME_VERSION)/J2CTranslator/test
# 	cp -R --target-directory=tardir \
# 	Install.class
# 	cp -R --target-directory=tardir/$(NAME_VERSION) \
# 	gc javalib AUTHORS BUGS ChangeLog README NEWS COPYING docs \
# 	J2CTranslator/test/Makefile.skel
# 	cp -R --target-directory=tardir/$(NAME_VERSION)/J2CTranslator \
# 	J2CTranslator/JavaGenCCode.class J2CTranslator/AST J2CTranslator/bytecode \
# 	J2CTranslator/parser JavaGrammar/beaver 
# 	cp -R --target-directory=tardir/$(NAME_VERSION)/J2CTranslator/test \
# 	J2CTranslator/test/helloworld J2CTranslator/test/regressiontests \
# 	J2CTranslator/test/Makefile.am.skel J2CTranslator/test/Makefile.skel \
# 	J2CTranslator/test/make.skel.rules J2CTranslator/test/bootstrap \
# 	J2CTranslator/test/configure.in.skel
# 	jar cvmf $(MANIFEST) $(JARFILE)  -C tardir $(NAME_VERSION) Install.class

# $(JARFILE): $(MAIN:java=class) Makefile
# 	jar cvmf $(MANIFEST) $(JARFILE) JavaGenCCode.class \
# 	AST bytecode parser
#	cp $(PARSER_DIR)/CachingAndTransformation.class .

## -- Create tar ball with jar archive, GC, and class library
# tar.gz:	$(JARFILE) Makefile all
# 	mkdir -p tardir/$(NAME_VERSION)/J2CTranslator/test
# 	cp -R --target-directory=tardir/$(NAME_VERSION)/J2CTranslator \
# 	JavaGenCCode.class AST bytecode parser ../JavaGrammar/beaver 
# 	cp -R --target-directory=tardir/$(NAME_VERSION) \
# 	../gc ../javalib ../AUTHORS ../BUGS ../ChangeLog ../README ../NEWS ../docs
# 	cp -R --target-directory=tardir/$(NAME_VERSION)/J2CTranslator/test \
# 	test/helloworld test/regressiontests test/Makefile.am.skel \
# 	test/Makefile.skel test/make.skel.rules test/bootstrap \
# 	test/configure.in.skel
# 	tar cfz  $(TARFILE) --exclude=CVS -C tardir $(NAME_VERSION)
# 	rm -r tardir