diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-13 09:16:38 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-13 09:16:38 +0000 |
commit | f0bc4109112dd7f1663eef3ec6271eda0250d9ee (patch) | |
tree | 9e192150dc27f779f40e00b515c78c3b0fb492d0 | |
parent | 729e1e497a1cb68477209bba3cd30d67c2837b4c (diff) | |
download | classpath-f0bc4109112dd7f1663eef3ec6271eda0250d9ee.tar.gz |
2008-06-13 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac:
Add --enable-gjdoc option and check
for mkdir -p.
* examples/Makefile.am,
* lib/Makefile.am,
* lib/copy-vmresources.sh.in:
Use @MKDIR_P@.
* tools/Makefile.am:
Allow building GJDoc to be disabled
and use @MKDIR_P@.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | configure.ac | 26 | ||||
-rw-r--r-- | examples/Makefile.am | 4 | ||||
-rw-r--r-- | lib/Makefile.am | 10 | ||||
-rw-r--r-- | lib/copy-vmresources.sh.in | 4 | ||||
-rwxr-xr-x | tools/Makefile.am | 43 |
6 files changed, 79 insertions, 21 deletions
@@ -1,3 +1,16 @@ +2008-06-13 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * configure.ac: + Add --enable-gjdoc option and check + for mkdir -p. + * examples/Makefile.am, + * lib/Makefile.am, + * lib/copy-vmresources.sh.in: + Use @MKDIR_P@. + * tools/Makefile.am: + Allow building GJDoc to be disabled + and use @MKDIR_P@. + 2008-06-13 Mark Wielaard <mark@klomp.org> * tools/Makefile.am (USE_JAVAC_FLAGS): Use relative generated dir. diff --git a/configure.ac b/configure.ac index 854f8de4a..ceb03a913 100644 --- a/configure.ac +++ b/configure.ac @@ -259,6 +259,19 @@ AC_ARG_ENABLE([gmp], [COMPILE_GMP=yes]) dnl ----------------------------------------------------------- +dnl GJDoc (enabled by default) +dnl ----------------------------------------------------------- +AC_ARG_ENABLE([gjdoc], + [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])], + [case "${enableval}" in + yes) COMPILE_GJDOC=yes ;; + no) COMPILE_GJDOC=no ;; + *) COMPILE_GJDOC=yes ;; + esac], + [COMPILE_GJDOC=yes]) +AM_CONDITIONAL(CREATE_GJDOC, test "x${COMPILE_GJDOC}" = xyes) + +dnl ----------------------------------------------------------- dnl Sets the native libraries installation dir dnl ----------------------------------------------------------- AC_ARG_WITH([native-libdir], @@ -349,6 +362,7 @@ AM_CONDITIONAL(CREATE_WRAPPERS, test "x${COMPILE_WRAPPERS}" = xyes) AC_PROG_LN_S AC_PROG_INSTALL +AC_PROG_MKDIR_P dnl ----------------------------------------------------------- dnl Checks for programs. @@ -361,7 +375,10 @@ AC_PROG_AWK AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CPP -AC_PROG_ANTLR(2,7,1) + +if test "x${COMPILE_GJDOC}" = xyes; then + AC_PROG_ANTLR(2,7,1) +fi # Handle -Werror default case. if test "$ENABLE_WERROR" = default; then @@ -1075,8 +1092,7 @@ tools/gtnameserv tools/gorbd tools/grmid tools/grmic -tools/gjavah -tools/gjdoc]) +tools/gjavah]) AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer]) AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner]) AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool]) @@ -1089,8 +1105,12 @@ AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd]) AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid]) AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic]) AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah]) +if test "x${COMPILE_GJDOC}" = xyes +then +AC_CONFIG_FILES([tools/gjdoc]) AC_CONFIG_COMMANDS([gjdoc], [chmod 755 tools/gjdoc]) fi +fi AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh]) AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh]) diff --git a/examples/Makefile.am b/examples/Makefile.am index 56b3c4577..d7befd4ce 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -85,9 +85,9 @@ dist-hook: # class files. Always regenerate all .class files and remove them immediatly. # And copy the png icons we use to the classes dir so they get also included. $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) - mkdir -p classes/gnu/classpath/examples/icons + @MKDIR_P@ classes/gnu/classpath/examples/icons cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons - mkdir -p classes/gnu/classpath/examples/swing + @MKDIR_P@ classes/gnu/classpath/examples/swing cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES) (cd classes; \ diff --git a/lib/Makefile.am b/lib/Makefile.am index 24561e806..872384905 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -77,18 +77,18 @@ endif # USE_PREBUILT_GLIBJ_ZIP resources: copy-vmresources.sh @list=`cd $(top_srcdir)/resource && $(FIND) gnu java javax org -name \*\.properties -print -o -name \*\.css -print`; for p in $$list; do \ dirname=`dirname $$p`; \ - if ! test -d "$$dirname"; then mkdir -p "$$dirname"; fi; \ + if ! test -d "$$dirname"; then @MKDIR_P@ "$$dirname"; fi; \ cp $(top_srcdir)/resource/$$p $$p; \ done @list=`cd $(top_srcdir)/resource && $(FIND) META-INF -name CVS -prune -o -name \*\.in -prune -o -type f -print`; for p in $$list; do \ dirname=`dirname $$p`; \ - if ! test -d "$$dirname"; then mkdir -p "$$dirname"; fi; \ + if ! test -d "$$dirname"; then @MKDIR_P@ "$$dirname"; fi; \ cp $(top_srcdir)/resource/$$p $$p; \ done @$(SHELL) ./copy-vmresources.sh @list=`cd $(top_srcdir) && $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print`; for p in $$list; do \ dirname=`dirname $$p`; \ - if ! test -d "$$dirname"; then mkdir -p "$$dirname"; fi; \ + if ! test -d "$$dirname"; then @MKDIR_P@ "$$dirname"; fi; \ cp $(top_srcdir)/$$p $$p; \ done touch resources @@ -96,7 +96,7 @@ resources: copy-vmresources.sh classes: genclasses $(top_builddir)/gnu/java/locale/LocaleData.java: $(top_srcdir)/scripts/generate-locale-list.sh - mkdir -p $(top_builddir)/gnu/java/locale + @MKDIR_P@ $(top_builddir)/gnu/java/locale $(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/gnu/java/locale/LocaleData.java genclasses: gen-classlist.sh standard.omit $(top_builddir)/gnu/java/locale/LocaleData.java gen-xpath-parser @@ -154,7 +154,7 @@ clean-local: -rm -rf lists dist-hook: - mkdir -p $(distdir) + @MKDIR_P@ $(distdir) cp -pdfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/sun $(top_srcdir)/vm $(top_srcdir)/resource $(distdir)/.. # Delete not wanted files. $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../sun $(distdir)/../vm $(distdir)/../resource -name CVS -print | xargs rm -fr diff --git a/lib/copy-vmresources.sh.in b/lib/copy-vmresources.sh.in index dbda9de20..3d3c41627 100644 --- a/lib/copy-vmresources.sh.in +++ b/lib/copy-vmresources.sh.in @@ -11,7 +11,7 @@ for p in ${vmdirs}; do (cd $p/META-INF; dirs=`find . -name "CVS" -prune -o -type d -print`; for u in ${dirs}; do - mkdir -p ${destMetaDir}/${u}; + @MKDIR_P@ ${destMetaDir}/${u}; done; files=`find . -name "CVS" -prune -o -name "*.in" -prune -o -type f -print`; for u in ${files}; do @@ -31,7 +31,7 @@ for p in ${vmdirs}; do resnewdirs=`echo ${resdirs} | uniq`; for u in ${resnewdirs}; do - mkdir -p ${destResDir}/${u}; + @MKDIR_P@ ${destResDir}/${u}; done for f in ${resfiles}; do diff --git a/tools/Makefile.am b/tools/Makefile.am index b5eec9691..dc15be3ff 100755 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -6,14 +6,20 @@ GLIBJ_CLASSPATH=asm # Setup the compiler to use the GNU Classpath library we just built. JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH) +if CREATE_GJDOC USE_JAVAC_FLAGS = -classpath $(CLASSPATH):$(srcdir):$(ANTLR_JAR):generated:. $(JAVAC_FLAGS) +else +USE_JAVAC_FLAGS = -classpath $(CLASSPATH):$(srcdir):. $(JAVAC_FLAGS) +endif if CREATE_WRAPPERS bin_SCRIPTS = bin_PROGRAMS = gappletviewer gjarsigner gkeytool \ gjar gnative2ascii gserialver gjavah grmiregistry \ - gtnameserv gorbd grmid grmic gjdoc - + gtnameserv gorbd grmid grmic +if CREATE_GJDOC +bin_PROGRAMS += gjdoc +endif AM_CPPFLAGS = -Wall \ -I$(top_srcdir)/include \ @@ -90,7 +96,10 @@ gjdoc_CFLAGS = \ else bin_SCRIPTS = gappletviewer gjarsigner gkeytool \ gjar gnative2ascii gserialver gjavah grmiregistry \ - gtnameserv gorbd grmid grmic gjdoc + gtnameserv gorbd grmid grmic +if CREATE_GJDOC +bin_SCRIPTS += gjdoc +endif bin_PROGRAMS = ## FIXME: revisit this with a newer automake. gappletviewer: gappletviewer.in @@ -105,11 +114,13 @@ gtnameserv: gtnameserv.in gorbd: gorbd.in grmid: grmid.in grmic: grmic.in +if CREATE_GJDOC gjdoc: gjdoc.in endif +endif EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in \ gjar.in gnative2ascii.in gserialver.in gjavah.in grmiregistry.in \ - gtnameserv.in gorbd.in grmid.in grmic.in + gtnameserv.in gorbd.in grmid.in grmic.in gjdoc.in # All our example java source files TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*/*.java \ @@ -247,6 +258,14 @@ gjdoc_resources = $(gnu_classpath_tools_gjdoc_jar_CSS) $(gnu_classpath_tools_gjd $(gnu_classpath_tools_gjdoc_jar_RNGS) $(gnu_classpath_tools_gjdoc_jar_TXTS) \ $(gnu_classpath_tools_gjdoc_jar_XHTML) $(gnu_classpath_tools_gjdoc_jar_XSLS) +if !CREATE_GJDOC +GJDOC_EX = -path '*gnu/classpath/tools/gjdoc' -prune -o \ + -path '*gnu/classpath/tools/doclets' -prune -o \ + -path '*com/sun/javadoc' -prune -o \ + -path '*com/sun/tools/doclets' -prune -o \ + -path '*com/sun/tools/javadoc' -prune -o +endif + # The zip files with classes we want to produce. TOOLS_ZIP = tools.zip @@ -284,10 +303,13 @@ dist-hook: # so they get also included. $(TOOLS_ZIP): $(ALL_TOOLS_FILES) @rm -rf classes asm generated - mkdir -p classes asm generated/gnu/classpath/tools/gjdoc/expr + @MKDIR_P@ classes asm +if CREATE_GJDOC ## Generate antlr sources. + @MKDIR_P@ generated/gnu/classpath/tools/gjdoc/expr $(ANTLR) -o generated/gnu/classpath/tools/gjdoc/expr \ $(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g +endif ## Compile ASM separately as it is latin-1 encoded. find $(srcdir)/external/asm -name '*.java' -print > asm.lst AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \ @@ -295,29 +317,32 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES) find $(srcdir)/gnu/classpath/tools \ $(srcdir)/com/sun/javadoc \ $(srcdir)/com/sun/tools/doclets \ + $(srcdir)/com/sun/tools/javadoc \ $(srcdir)/com/sun/tools/javac \ $(srcdir)/com/sun/tools/javah \ - $(srcdir)/com/sun/tools/javadoc \ $(srcdir)/sun/rmi/rmic \ + $(GJDOC_EX) \ -name '*.java' -print > classes.lst $(JCOMPILER) $(USE_JAVAC_FLAGS) -g -d classes @classes.lst cat classes.lst asm.lst > all-classes.lst ## Copy over tools resource files. @list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \ - sun/rmi/rmic -name \*.properties -print -o -name \*.jav -print`; \ + sun/rmi/rmic $(GJDOC_EX) -name \*.properties -print -o -name \*.jav -print`; \ for p in $$list; do \ dirname=classes/`dirname $$p`; \ - if ! test -d "$$dirname"; then mkdir -p "$$dirname"; fi; \ + if ! test -d "$$dirname"; then @MKDIR_P@ "$$dirname"; fi; \ echo " cp $(srcdir)/resource/$$p classes/$$p"; \ cp $(srcdir)/resource/$$p classes/$$p; \ done +if CREATE_GJDOC ## Copy over gjdoc resource files. for res in $(gjdoc_resources); do \ dir=classes/`dirname $$res`; \ - if ! test -d "$$dir"; then mkdir -p "$$dir"; fi; \ + if ! test -d "$$dir"; then @MKDIR_P@ "$$dir"; fi; \ echo " cp $(srcdir)/resource/gnu/classpath/tools/gjdoc/$$res classes/$$res"; \ cp $(srcdir)/resource/gnu/classpath/tools/gjdoc/$$res classes/$$res; \ done +endif ## First add classpath tools stuff. (cd classes; \ if test "$(ZIP)" != ""; then $(ZIP) -r ../$(TOOLS_ZIP) .; fi; \ |