[antlr-interest] Re: antlr build problem

wolfgang haefelinger no.reply at haefelinger.net
Sat Dec 17 06:04:39 PST 2005


Hi Dan,

I  tried  your  script  and it works fine on my machine. Let's have
then a closer look at the Makefile

    antlr/Makefile[.in]

You will fine the Makefile template (Makefile.in) in the $SRC/antlr
directory; the instance (Makefile) in $TMP/antlr.

The relevant rule for compiling Java source code is something like

## rule how to compile java files
/home/geronimo/opt/tmp_antlr/antlr/antlr.jar :: $(antlr_java_FILES)
       [..]
        @ /bin/sh /home/geronimo/opt/tmp_antlr/scripts/javac.sh $?
       [..]

All Java files are listed in variable $(antlr_java_FILES) defined
a couple of lines above this rule.

The basic idea is to compile only those Java files newer than the
target "antlr.jar". This gets expressed by "$?".

An explanation for compiling "zero" files would therefore be that
there is just no file newer than "antlr.jar".

This is however contradicted by the fact that rule above gets
triggered, i.e. there must be at least one file in $(antlr_java_FILES)
newer than "antlr.jar"!

Perhaps "$?" is not working?
=> Please replace "$?" by "$(antlr_java_FILES)" and run "make"
again.

If you see a difference now then I really wonder which flavour of
"make" you are using?

Let's assume nothing has changed, it's still not working. In this
case it's now time to have a look at

    scripts/javac.sh[.in].

because I assume now that arguments provided by the script caller
are lost somewhere in the darkness of shell programming ..

=> Please modify scripts/javac.sh so that your first two lines are
looking like

#!/bin/sh
set -x

Warning: please make sure that "javac.sh" is still in UNIX style
after your modifications, i.e. lines still end with '\n' and not
with '\r\n'. If this is a problem for you, you can alternativly
also change the Makefile to read

    @ /bin/sh -x /home/geronimo/opt/tmp_antlr/scripts/javac.sh $?


Having done this, please run 'make' again and collect it's output:

 make 2>&1 | tee antlr.log

You should now "see" a lot of additional output. Perhaps it gives
you a clue what went wrong. In any case, please send me the log
file:

    me => ora dot et dot labora at web dot de

Cheers,
Wolfgang.








"Dan Axline" <waxline at dsndata.com> wrote in 
message news:43963DE4.6080503 at dsndata.com...
>I get this error when running make:
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> make -C ./antlr all
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> *** compiling 0 Java file(s)
> javac: no source files
>
> ...
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>                       >> E R R O R <<
> ============================================================
>
> /usr/local/waxline/programs/j2sdk1.4.2_05/bin/javac -d . -sourcepath
> /usr/local/waxline/downloads/antlr-2.7.5 -classpath
> /usr/local/waxline/tmp_antlr/antlr/antlr.jar:/usr/local/waxline/programs/j2sdk1.4.2_05/lib:.
>
> ============================================================
> Got an error while trying to execute  command  above.  Error
> messages (if any) must have shown before. The exit code was:
> exit(2)
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> make[1]: *** [/usr/local/waxline/tmp_antlr/antlr/antlr.jar] Error 2
> make: *** [all] Error 1
>
>
> I tried figuring out what is wrong with the Makefile, but I'm out of
> my depth there.  Apparently $ARGV is empty in javac.sh...
>
> Here is a script describing how I am trying to install antlr:
>
> #!/bin/bash
>
> BASE=/usr/local/waxline
> DOWNLOADS=$BASE/downloads
> TMP=$BASE/tmp_antlr
> SRC=$DOWNLOADS/antlr-2.7.5
> INSTALL=$BASE/programs/antlr-2.7.5
>
> cd $DOWNLOADS
> wget http://www.antlr.org/download/antlr-2.7.5.tar.gz
> tar -zxvf antlr-2.7.5.tar.gz
> mkdir $TMP
> cd $TMP
> $SRC/configure --prefix=$INSTALL
> make
>
> Any ideas about where I am going wrong?
>
> 





More information about the antlr-interest mailing list