Makefile.am 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. # Process this with automake to create Makefile.in
  2. include $(top_srcdir)/source-list
  3. CLASSPATH = .$(CLASSPATH_SEPARATOR)$(srcdir)$(CLASSPATH_SEPARATOR)@conf_classpath@$$CLASSPATH
  4. FIXED_SUBDIRS = bin doc testsuite gnu/bytecode \
  5. gnu \
  6. kawa/lib gnu/kawa/slib gnu/kawa/servlet \
  7. gnu/commonlisp/lisp gnu/commonlisp/testsuite \
  8. gnu/q2/testsuite
  9. ANDROID_SUBDIRS = gnu/kawa/android
  10. BRL_SUBDIRS = gnu/brl gnu/kawa/brl
  11. JAVAFX_SUBDIRS = gnu/kawa/javafx
  12. JEMACS_SUBDIRS = gnu/jemacs/lisp gnu/jemacs/testsuite
  13. XQUERY_SUBDIRS = gnu/xquery/testsuite
  14. SUBDIRS = $(FIXED_SUBDIRS)
  15. if ENABLE_JEMACS
  16. SUBDIRS += $(JEMACS_SUBDIRS)
  17. endif
  18. if ENABLE_XML
  19. if ENABLE_BRL
  20. SUBDIRS += $(BRL_SUBDIRS)
  21. endif
  22. if ENABLE_XQUERY
  23. SUBDIRS += $(XQUERY_SUBDIRS)
  24. endif
  25. endif
  26. if WITH_ANDROID
  27. SUBDIRS += $(ANDROID_SUBDIRS)
  28. endif
  29. if WITH_JAVAFX
  30. SUBDIRS += $(JAVAFX_SUBDIRS)
  31. endif
  32. DIST_SUBDIRS = $(FIXED_SUBDIRS) \
  33. $(ANDROID_SUBDIRS) \
  34. $(BRL_SUBDIRS) \
  35. $(JAVAFX_SUBDIRS) \
  36. $(JEMACS_SUBDIRS) \
  37. $(XQUERY_SUBDIRS)
  38. javadir=$(datadir)/java
  39. SED = sed
  40. CHMOD = chmod
  41. JAR = jar
  42. FIND = @FIND@
  43. KAWAJAR = kawa.jar
  44. KAWALIB = $(datadir)/kawa/lib/$(KAWAJAR)
  45. # external domterm-jar
  46. DOMTERM_JAR = @WITH_DOMTERM_ARG@/share/domterm/domterm.jar
  47. META_ScriptEngineFactory = META-INF/services/javax.script.ScriptEngineFactory
  48. if WITH_JAVAX_SCRIPT
  49. META_INF_FILES = $(META_ScriptEngineFactory)
  50. endif
  51. misc-classes.stamp: $(java_sources)
  52. if test -f misc-classes.stamp; then \
  53. $(JAVAC) -d $(top_builddir) -classpath "$(CLASSPATH)" $(JAVACFLAGS) $?; \
  54. else \
  55. $(MAKE) javac-all; \
  56. fi
  57. echo timestamp > misc-classes.stamp
  58. javac-all: tmp-sources1.list
  59. $(JAVAC) -d $(top_builddir) -classpath "$(CLASSPATH)" $(JAVACFLAGS) @tmp-sources1.list
  60. kawa-jar.stamp: misc-classes.stamp kawa/Version.class
  61. echo timestamp > kawa-jar.stamp
  62. classes.list: ./kawa-jar.stamp
  63. $(FIND) gnu kawa -name '*.class' -print >classes.list
  64. tmp-sources1.list: source-list Makefile.am
  65. (for f in $(sources_gnu_core); do echo $(srcdir)/$$f; done) >tmp-list
  66. (for f in $(sources_gnu_misc); do echo $(srcdir)/$$f; done) >>tmp-list
  67. (for f in $(sources_gnu_selected); do echo $(srcdir)/$$f; done) >>tmp-list
  68. (for f in $(sources_kawa_core); do echo $(srcdir)/$$f; done) >>tmp-list
  69. (for f in $(sources_kawa_selected); do echo $(srcdir)/$$f; done) >>tmp-list
  70. mv tmp-list $@
  71. classes-rt.list: ./kawa-jar.stamp $(srcdir)/classes-to-skip-for-runtime
  72. $(FIND) gnu kawa -name '*.class' -print | grep -v -f $(srcdir)/classes-to-skip-for-runtime >classes-rt.list
  73. lib/kawa.jar: ./kawa-jar.stamp $(META_INF_FILES) classes.list
  74. mkdir -p lib
  75. $(JAR) cmf $(srcdir)/jar-manifest $@ $(META_INF_FILES) @classes.list
  76. lib/kawart.jar: ./kawa-jar.stamp classes-rt.list
  77. mkdir -p lib
  78. $(JAR) cf $@ @classes-rt.list
  79. $(META_ScriptEngineFactory): Makefile
  80. echo 'kawa.standard.SchemeScriptEngineFactory #Scheme' >tmp.ScriptEngineFactory
  81. if ENABLE_XQUERY
  82. echo 'gnu.xquery.lang.XQueryScriptEngineFactory #XQuery' >>tmp.ScriptEngineFactory
  83. endif
  84. mkdir -p META-INF/services
  85. mv tmp.ScriptEngineFactory $(META_ScriptEngineFactory)
  86. kawa-doc.tar.gz: kawa-doc-$(VERSION).tar.gz
  87. kawa-doc-$(VERSION).tar.gz: doc/kawa.texi
  88. cd doc; $(MAKE) ../kawa-doc-$(VERSION).tar.gz
  89. JLINE_VERSION_MAJOR=3
  90. DEFAULT_JAVA_VERSION = 8
  91. dist-kawa.jar: dist
  92. srcdir=`(cd $(srcdir); /bin/pwd)` \
  93. && rm -rf tmpdir \
  94. && mkdir -p tmpdir tmpdir/lib \
  95. && cd tmpdir \
  96. && tar xzf ../$(distdir).tar.gz \
  97. && rm -f ./patch-source-list \
  98. && ./kawa-$(VERSION)/configure --with-java-source=$(DEFAULT_JAVA_VERSION) \
  99. --with-domterm="@WITH_DOMTERM_ARG@" \
  100. --with-jline$(JLINE_VERSION_MAJOR)="@WITH_JLINE_PATH@" \
  101. --with-servlet=@WITH_SERVLET_ARG@ --with-javafx=@WITH_JAVAFX_ARG@ \
  102. && CLASSPATH=@conf_classpath@.$(CLASSPATH_SEPARATOR)$$CLASSPATH $(MAKE) all JAVAC="$(JAVAC) -source $(DEFAULT_JAVA_VERSION) -target $(DEFAULT_JAVA_VERSION)" \
  103. && mv lib/kawa.jar ../dist-kawa.jar \
  104. && cd .. && rm -rf tmpdir
  105. ZIP_VERSION = $(VERSION)
  106. kawa.zip: kawa-$(ZIP_VERSION).zip
  107. kawa-snapshot.zip:
  108. $(MAKE) kawa.zip ZIP_VERSION=$(VERSION)-`date +%Y%m%d`
  109. kawa-$(ZIP_VERSION).zip: dist-kawa.jar doc/kawa-manual.epub bin/kawa.bat
  110. mkdir -p kawa-$(VERSION) kawa-$(VERSION)/lib kawa-$(VERSION)/bin kawa-$(VERSION)/doc
  111. cd kawa-$(VERSION)/lib; \
  112. $(LN_S) ../../dist-kawa.jar kawa.jar; \
  113. $(LN_S) $(DOMTERM_JAR) domterm.jar; \
  114. $(LN_S) @WITH_SERVLET_ARG@ servlet.jar; \
  115. $(LN_S) @WITH_SERVLET_ARG@ servlet.jar; \
  116. $(LN_S) @WITH_JLINE_PATH@ jline.jar
  117. docsrcdir="`cd $(srcdir); pwd`/doc"; \
  118. cd kawa-$(VERSION)/doc; \
  119. $(LN_S) ../../doc/kawa-manual.epub kawa-manual.epub; \
  120. $(LN_S) $$docsrcdir/README-epub README-epub; \
  121. $(LN_S) $$docsrcdir/+default+ +default+
  122. cd kawa-$(VERSION)/bin; \
  123. $(LN_S) ../../bin/@KAWA_SCRIPT@ kawa; \
  124. $(LN_S) ../../bin/kawa.bat kawa.bat
  125. zip $@ kawa-$(VERSION)/bin/kawa -r kawa-$(VERSION)
  126. upload-kawa.snapshot.zip:
  127. gnupload --replace --to ftp.gnu.org:kawa --symlink-regex kawa-$(VERSION)-`date +%Y%m%d`.zip
  128. upload-kawa.release.zip:
  129. gnupload --to ftp.gnu.org:kawa --symlink-regex kawa-$(VERSION).tar.gz kawa-$(VERSION).zip
  130. doc/kawa-manual.epub: doc/kawa.texi
  131. cd doc && $(MAKE) kawa-manual.epub
  132. lib/jemacs.jar:
  133. srcdir=`(cd $(srcdir); /bin/pwd)` \
  134. && rm -rf tmpdir \
  135. && mkdir tmpdir \
  136. && cd tmpdir \
  137. && $$srcdir/configure --with-swing \
  138. && $(MAKE) \
  139. && $(JAR) cmf $$srcdir/gnu/jemacs/jar-manifest \
  140. ../lib/jemacs.jar \
  141. `$(FIND) . -name '*.class' -print` \
  142. && cd .. && rm -rf tmpdir
  143. lib/bytecode.jar: ./gnu/bytecode/java-classes.stamp
  144. $(JAR) cmf $(srcdir)/gnu/bytecode/jar-manifest \
  145. lib/bytecode.jar \
  146. `$(FIND) gnu/bytecode -name '*.class' -print`
  147. kawa-@VERSION@-src.zip: kawa-@VERSION@.tar.gz
  148. mkdir zip-temp
  149. cd zip-temp ;\
  150. tar xzf ../kawa-@VERSION@.tar.gz; \
  151. zip -q -r ../kawa-@VERSION@-src.zip kawa-@VERSION@
  152. rm -rf zip-temp
  153. kawa-compiled.zip: kawa-@VERSION@-compiled.zip
  154. kawa.jar: lib/kawa.jar
  155. kawa-src.zip: kawa-@VERSION@-src.zip
  156. jemacs.jar: lib/jemacs.jar
  157. bytecode.jar: lib/bytecode.jar
  158. EXTRA_DIST = debian/control debian/rules debian/changelog debian/dirs \
  159. config.guess config.sub install-sh ./mkinstalldirs \
  160. patch-source-list selected-java-source \
  161. build.xml build.properties \
  162. $(MISC_EXTRA_DIST) \
  163. gnu/jemacs/jar-manifest gnu/jemacs/status.html \
  164. kawa/Version.java jar-manifest Make-rules classes-to-skip-for-runtime \
  165. bin/configure.ac bin/configure bin/Makefile.am bin/Makefile.in \
  166. bin/ChangeLog bin/kawa.bat.in bin/kawa.c bin/kawapath.c bin/cgi-servlet.c \
  167. bin/kawa.sh.in bin/qexo.in
  168. MOSTLYCLEANFILES = tmp* *.o bin/*.o *.stamp */*.class */*/*.class */*/*/*.class classes.list classes-rt.list
  169. CLEANFILES = *.jar lib/*.jar *.zip bin/kawa bin/qexo kawa/Version.java $(META_ScriptEngineFactory)
  170. DISTCLEANFILES = selected-java-source bin/kawa.sh bin/kawa bin/kawa.bat
  171. MAINTAINERCLEANFILES = \
  172. $(GENERATED_SIMPLEVECTOR_FILES) $(srcdir)/patch-source-list
  173. HTML_HOME = $$HOME/public_html
  174. JAVADOC_DIR = $$HOME/Kawa/api
  175. JAVADOC_PACKAGES = \
  176. gnu.bytecode gnu.ecmascript gnu.expr gnu.mapping gnu.math gnu.text gnu.lists\
  177. gnu.xml gnu.kawa.reflect gnu.kawa.util gnu.kawa.lispexpr gnu.kawa.functions \
  178. gnu.kawa.servlet gnu.kawa.ant kawa kawa.lang kawa.standard kawa.lib \
  179. gnu.kawa.xml gnu.xquery.lang gnu.xquery.util gnu.brl gnu.kawa.brl \
  180. gnu.kawa.xslt gnu.kawa.sax gnu.commonlisp.lang gnu.q2.lang \
  181. gnu.kawa.models gnu.kawa.swingviews gnu.kawa.swtviews gnu.kawa.echo2 \
  182. gnu.jemacs.lang gnu.jemacs.buffer gnu.jemacs.swing gnu.jemacs.swt \
  183. gnu.kawa.android gnu.kawa.javafx
  184. JAVADOC = javadoc
  185. JAVADOC_FLAGS = -use
  186. #JAVADOC_FLAGS = -J-Xmx60m
  187. # NOTE: To update javadoc:
  188. # make install-javadoc-html
  189. # When satisfied:
  190. # make javadoc-cvs.log
  191. # When satisfied:
  192. # cd ~/Kawa/api && cvs ci -m 'Re-run javadoc.'
  193. javadoc-cvs.log:
  194. cd $(JAVADOC_DIR) \
  195. && $(FIND) . -name CVS -prune -o -type f -exec echo rm '{}' ';'
  196. $(MAKE) install-javadoc-html >&LOG.JAVADOC
  197. (cd $(JAVADOC_DIR) && cvs -n update -d .>&/tmp/cvs-changes \
  198. && (grep '^[?] ' /tmp/cvs-changes |sed -e 's|[?] ||') >/tmp/cvs-adds \
  199. && (test '!' -s /tmp/cvs-adds || cvs add `cat /tmp/cvs-adds`) \
  200. && (grep '^[U] ' /tmp/cvs-changes |sed -e 's|[U] ||') >/tmp/cvs-rems\
  201. && (test '!' -s /tmp/cvs-rems || cvs remove `cat /tmp/cvs-rems`) \
  202. && cvs update -d .) >cvs-update.log
  203. echo ExamineCheck ./cvs-update.log
  204. echo then: "(cd $(JAVADOC_DIR) && cvs ci -m 'Re-run javadoc.')".
  205. ECLIPSE_PLUGINS_PATH = /opt/eclipse/plugins
  206. JAVADOC_ANT_JARS = $(ECLIPSE_PLUGINS_PATH)/org.apache.ant_1.6.5/lib/ant.jar
  207. JAVADOC_ECLIPSE_JARS = $(ECLIPSE_PLUGINS_PATH)/org.eclipse.jface_3.1.0.jar:$(ECLIPSE_PLUGINS_PATH)/org.eclipse.swt.gtk.linux.x86_3.1.0.jar
  208. JAVADOC_EXTRA_PATH = $(JAVADOC_ECLIPSE_JARS):$(JAVADOC_ANT_JARS)
  209. install-javadoc-html:
  210. -mkdir $(JAVADOC_DIR)
  211. -#rm `$(FIND) $(JAVADOC_DIR)/ -name CVS -prune -o '(' '!' -type d ')' -print`
  212. -rm `$(FIND) $(JAVADOC_DIR)/ -name '*.html'`
  213. CLASSPATH=$(JAVADOC_EXTRA_PATH)$(CLASSPATH_SEPARATOR)@conf_classpath@$$CLASSPATH \
  214. $(JAVADOC) $(JAVADOC_FLAGS) -sourcepath .:$(top_srcdir) -d $(JAVADOC_DIR) $(JAVADOC_PACKAGES)
  215. cp $(srcdir)/COPYING $(JAVADOC_DIR)/COPYING
  216. install-html: install-javadoc-html
  217. cd doc; make install-html HTML_HOME="$(HTML_HOME)"
  218. install-binSCRIPTS: $(bin_SCRIPTS)
  219. @$(NORMAL_INSTALL)
  220. test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
  221. $(INSTALL_SCRIPT) bin/qexo $(DESTDIR)$(bindir)/qexo
  222. if ! ENABLE_KAWA_FRONTEND
  223. -rm -f $(DESTDIR)$(bindir)/kawa
  224. cd $(DESTDIR)$(bindir) && \
  225. $(LN_S) $(datadir)/kawa/bin/kawa kawa
  226. endif
  227. install-data-am: install-jar
  228. $(mkinstalldirs) $(DESTDIR)$(datadir)/kawa \
  229. $(DESTDIR)$(datadir)/kawa/bin $(DESTDIR)$(datadir)/kawa/lib
  230. $(INSTALL_SCRIPT) bin/@KAWA_SCRIPT@ $(DESTDIR)$(datadir)/kawa/bin/kawa
  231. install-jar:
  232. @$(NORMAL_INSTALL)
  233. $(mkinstalldirs) $(DESTDIR)$(datadir)/kawa \
  234. $(DESTDIR)$(datadir)/kawa/bin $(DESTDIR)$(datadir)/kawa/lib
  235. $(INSTALL_DATA) lib/kawa.jar \
  236. $(DESTDIR)$(datadir)/kawa/lib/$(KAWAJAR)
  237. if WITH_DOMTERM
  238. -rm -f $(DESTDIR)$(datadir)/kawa/lib/domterm.jar
  239. cd $(DESTDIR)$(datadir)/kawa/lib && \
  240. $(LN_S) $(DOMTERM_JAR) domterm.jar
  241. endif
  242. if ENABLE_SERVLET
  243. -rm -f $(DESTDIR)$(datadir)/kawa/lib/servlet.jar
  244. cd $(DESTDIR)$(datadir)/kawa/lib && \
  245. $(LN_S) @WITH_SERVLET_ARG@ servlet.jar
  246. endif
  247. if WITH_JLINE3
  248. -rm -f $(DESTDIR)$(datadir)/kawa/lib/jline.jar
  249. cd $(DESTDIR)$(datadir)/kawa/lib && \
  250. $(LN_S) @WITH_JLINE_PATH@ jline.jar
  251. endif
  252. if WITH_LSP4J
  253. -rm -f $(DESTDIR)$(datadir)/kawa/lib/lsp4j.jar
  254. cd $(DESTDIR)$(datadir)/kawa/lib && \
  255. $(LN_S) @WITH_LSP4J_PATH@ lsp4j.jar
  256. endif
  257. install-bytecode-jar: lib/bytecode.jar
  258. @$(NORMAL_INSTALL)
  259. $(mkinstalldirs) $(DESTDIR)$(javadir)
  260. $(INSTALL_DATA) lib/bytecode.jar \
  261. $(DESTDIR)$(javadir)/bytecode.jar
  262. uninstall-local: uninstall-jar uninstall-exec-bindir uninstall-data
  263. uninstall-jar:
  264. rm -f $(DESTDIR)$(datadir)/kawa/lib/$(KAWAJAR) \
  265. $(DESTDIR)$(datadir)/kawa/lib/kawa.jar
  266. uninstall-data:
  267. rm -f $(DESTDIR)$(datadir)/kawa/bin/kawa
  268. uninstall-exec-bindir:
  269. rm -f $(DESTDIR)$(bindir)/kawa $(DESTDIR)$(bindir)/qexo
  270. uninstall-bytecode-jar:
  271. rm -f $(DESTDIR)$(javadir)/bytecode.jar \
  272. $(DESTDIR)$(javadir)/bytecode.jar
  273. kawa/Version.java: $(srcdir)/kawa/Version.java.in $(srcdir)/configure.ac
  274. test -d $(srcdir)/.git \
  275. && GIT_REVISION=`cd $(srcdir) && git describe --always --dirty --long --tags 2>/dev/null` \
  276. && test -n "$$GIT_REVISION" \
  277. && GIT_REVISION=" (git describe: $${GIT_REVISION})"; \
  278. sed -e 's|VERSION|@VERSION@'"$$GIT_REVISION|" <$(srcdir)/kawa/Version.java.in >$@
  279. all-recursive: kawa/Version.java selected-java-source $(GENERATED_SIMPLEVECTOR_FILES)
  280. all: lib/kawa.jar lib/kawart.jar $(JLINE_LINK) $(DOMTERM_LINK) $(SERVLET_LINK) \
  281. $(GSON_LINK) $(LSP4J_LINK) $(LSP4J_JSONRPC_LINK)
  282. if WITH_LSP4J
  283. GSON_LINK = lib/gson.jar
  284. LSP4J_LINK = lib/lsp4j.jar
  285. LSP4J_JSONRPC_LINK = lib/lsp4j.jsonrpc.jar
  286. lib/gson.jar:
  287. mkdir -p lib
  288. $(LN_S) @WITH_GSON_PATH@ lib/gson.jar
  289. lib/lsp4j.jar:
  290. mkdir -p lib
  291. $(LN_S) @WITH_LSP4J_PATH@ lib/lsp4j.jar
  292. lib/lsp4j.jsonrpc.jar:
  293. mkdir -p lib
  294. $(LN_S) @WITH_LSP4J_JSONRPC_PATH@ lib/lsp4j.jsonrpc.jar
  295. endif
  296. if WITH_JLINE3
  297. JLINE_LINK = lib/jline.jar
  298. lib/jline.jar:
  299. mkdir -p lib
  300. -rm -f lib/jline.jar
  301. $(LN_S) @WITH_JLINE_PATH@ lib/jline.jar
  302. endif
  303. if WITH_DOMTERM
  304. DOMTERM_LINK = lib/domterm.jar
  305. lib/domterm.jar:
  306. mkdir -p lib
  307. -rm -f lib/domterm.jar
  308. $(LN_S) $(DOMTERM_JAR) lib/domterm.jar
  309. endif
  310. if ENABLE_SERVLET
  311. SERVLET_LINK = lib/servlet.jar
  312. lib/servlet.jar:
  313. mkdir -p lib
  314. $(LN_S) @WITH_SERVLET_ARG@ lib/servlet.jar
  315. endif
  316. JAVA_SOURCE = @JAVA_SOURCE@
  317. if WITH_HTTPSERVER
  318. PREPROCESS_HTTPSERVER = +use:com.sun.net.httpserver
  319. else
  320. PREPROCESS_HTTPSERVER = -use:com.sun.net.httpserver
  321. endif
  322. if WITH_JLINE3
  323. PREPROCESS_JLINE3 = +with:jline3
  324. else
  325. PREPROCESS_JLINE3 = -with:jline3
  326. endif
  327. if WITH_LSP4J
  328. PREPROCESS_LSP4J = +with:lsp4j
  329. else
  330. PREPROCESS_LSP4J = -with:lsp4j
  331. endif
  332. if ENABLE_XML
  333. PREPROCESS_XML = +enable:XML
  334. else
  335. PREPROCESS_XML = -enable:XML
  336. endif
  337. if WITH_AWT
  338. PREPROCESS_AWT = +use:java.awt
  339. else
  340. PREPROCESS_AWT = -use:java.awt
  341. endif
  342. $(srcdir)/patch-source-list: $(top_srcdir)/configure
  343. (cd $(srcdir); \
  344. $(FIND) . -name '*.java' -exec grep -lE ' #endif ' '{}' ';') \
  345. | sed -e 's|./||' | sort > $@
  346. kawa/Version.class: kawa/Version.java
  347. $(JAVAC) -d . $(JAVACFLAGS) $^
  348. gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
  349. $(JAVAC) -d . $(JAVACFLAGS) $^
  350. JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@ $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3) $(PREPROCESS_LSP4J) $(PREPROCESS_AWT)
  351. selected-java-source: Makefile $(srcdir)/patch-source-list
  352. if test ! -e selected-java-source -o \
  353. "$(JAVA_PREPROCESS_OPTIONS)" != "`cat selected-java-source`"; \
  354. then $(MAKE) do-preprocess; \
  355. fi
  356. echo "$(JAVA_PREPROCESS_OPTIONS)" >selected-java-source
  357. do-preprocess: gnu/kawa/util/PreProcess.class
  358. CLASSPATH=".$(CLASSPATH_SEPARATOR)$$CLASSPATH" $(JAVA) gnu.kawa.util.PreProcess \
  359. $(JAVA_PREPROCESS_OPTIONS) \
  360. `sed -e 's|\([^ ]*\)|$(srcdir)/\1|' < $(srcdir)/patch-source-list`
  361. GENERATED_SIMPLEVECTOR_FILES =\
  362. $(srcdir)/gnu/lists/FVector.java \
  363. $(srcdir)/gnu/lists/BitVector.java \
  364. $(srcdir)/gnu/lists/ByteVector.java \
  365. $(srcdir)/gnu/lists/ShortVector.java \
  366. $(srcdir)/gnu/lists/IntVector.java \
  367. $(srcdir)/gnu/lists/LongVector.java \
  368. $(srcdir)/gnu/lists/F32Vector.java \
  369. $(srcdir)/gnu/lists/F64Vector.java \
  370. $(srcdir)/gnu/lists/S8Vector.java \
  371. $(srcdir)/gnu/lists/S16Vector.java \
  372. $(srcdir)/gnu/lists/S32Vector.java \
  373. $(srcdir)/gnu/lists/S64Vector.java \
  374. $(srcdir)/gnu/lists/U8Vector.java \
  375. $(srcdir)/gnu/lists/U16Vector.java \
  376. $(srcdir)/gnu/lists/U32Vector.java \
  377. $(srcdir)/gnu/lists/U64Vector.java
  378. .PHONY: make-primvector-source
  379. make-primvector-source: $(srcdir)/gnu/lists/PrimVector.template gnu/kawa/util/PreProcess.class
  380. CLASSPATH=".$(CLASSPATH_SEPARATOR)$$CLASSPATH" $(JAVA) gnu.kawa.util.PreProcess \
  381. '%$(TAG)' '%UniformVector' -o $(OUT) $<
  382. $(srcdir)/gnu/lists/FVector.java: $(srcdir)/gnu/lists/PrimVector.template
  383. $(MAKE) make-primvector-source OUT=$@ TAG=OBJECT
  384. $(srcdir)/gnu/lists/BitVector.java: $(srcdir)/gnu/lists/PrimVector.template
  385. $(MAKE) make-primvector-source OUT=$@ TAG=BIT
  386. $(srcdir)/gnu/lists/ByteVector.java: $(srcdir)/gnu/lists/PrimVector.template
  387. $(MAKE) make-primvector-source OUT=$@ TAG=BYTE
  388. $(srcdir)/gnu/lists/ShortVector.java: $(srcdir)/gnu/lists/PrimVector.template
  389. $(MAKE) make-primvector-source OUT=$@ TAG=SHORT
  390. $(srcdir)/gnu/lists/IntVector.java: $(srcdir)/gnu/lists/PrimVector.template
  391. $(MAKE) make-primvector-source OUT=$@ TAG=INT
  392. $(srcdir)/gnu/lists/LongVector.java: $(srcdir)/gnu/lists/PrimVector.template
  393. $(MAKE) make-primvector-source OUT=$@ TAG=LONG
  394. $(srcdir)/gnu/lists/F32Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  395. $(MAKE) make-primvector-source OUT=$@ TAG=F32
  396. $(srcdir)/gnu/lists/F64Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  397. $(MAKE) make-primvector-source OUT=$@ TAG=F64
  398. $(srcdir)/gnu/lists/S8Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  399. $(MAKE) make-primvector-source OUT=$@ TAG=S8
  400. $(srcdir)/gnu/lists/S16Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  401. $(MAKE) make-primvector-source OUT=$@ TAG=S16
  402. $(srcdir)/gnu/lists/S32Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  403. $(MAKE) make-primvector-source OUT=$@ TAG=S32
  404. $(srcdir)/gnu/lists/S64Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  405. $(MAKE) make-primvector-source OUT=$@ TAG=S64
  406. $(srcdir)/gnu/lists/U8Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  407. $(MAKE) make-primvector-source OUT=$@ TAG=U8
  408. $(srcdir)/gnu/lists/U16Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  409. $(MAKE) make-primvector-source OUT=$@ TAG=U16
  410. $(srcdir)/gnu/lists/U32Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  411. $(MAKE) make-primvector-source OUT=$@ TAG=U32
  412. $(srcdir)/gnu/lists/U64Vector.java: $(srcdir)/gnu/lists/PrimVector.template
  413. $(MAKE) make-primvector-source OUT=$@ TAG=U64
  414. clean-generated-simplevector-files:
  415. -rm -f $(GENERATED_SIMPLEVECTOR_FILES)
  416. if ON_WINDOWS
  417. # kawa.sh is still needed for 'make check', even on Windows.
  418. KAWASCRIPTS_KAWA = bin/kawa.bat bin/kawa.sh
  419. else
  420. KAWASCRIPTS_KAWA = bin/@KAWA_SCRIPT@
  421. endif
  422. noinst_SCRIPTS = bin/@KAWA_SCRIPT@
  423. bin_SCRIPTS = bin/qexo $(KAWASCRIPTS_KAWA)
  424. #bin/kawa.bat: $(srcdir)/bin/kawa.bat.in
  425. # sed -e 's|@VERSION@|$(VERSION)|' \
  426. # -e 's|@DEFAULT_EXTRA_PATH@|'`echo '$(conf_classpath)'| sed -e 's|[\]|\\\\|g' -e 's|\&|\\&|g'`'|' \
  427. # <$(srcdir)/bin/kawa.bat.in > bin/kawa.bat
  428. STANDARD_NAMED_CHARS_URL = http://www.w3.org/2003/entities/2007/w3centities-f.ent
  429. $(srcdir)/gnu/text/StandardNamedChars.java:
  430. wget -nv -O - $(STANDARD_NAMED_CHARS_URL) \
  431. | sed -n -e 's|&#38;|\&|' \
  432. -e '/ENTITY/s/^.*ENTITY *\([^ ]*\) *"\([^"]*\)" *>\(.*\)$$/ t.put("\1"\2);\3/p' \
  433. | sed -e 's|<!--\(.*\)-->| // \1|' \
  434. -e 's|&#x\([0-9a-fA-F]*\);|, 0x\1|g' \
  435. -e 's|&#0*\([0-9a-fA-F]*\);|, \1|g' \
  436. -e '1i\' \
  437. -e '// DO NOT EDIT: This file is automatically generated by gnu/text/Makefile.\' \
  438. -e 'package gnu.text;\' \
  439. -e 'public class StandardNamedChars {\' \
  440. -e ' public static final NamedCharTable instance = new NamedCharTable();\' \
  441. -e ' static { NamedCharTable t = instance;' \
  442. -e '$$a\' \
  443. -e '}}' \
  444. > $@
  445. distall: distcheck kawa.zip kawa-doc-$(VERSION).tar.gz
  446. # Consider also:
  447. # kawa-@VERSION@-src.zip jemacs-@JEMACS_VERSION@.jar bytecode-@BYTECODE_VERSION@.jar