[Sablevm-developer] Incorrect order of m4 arguments causes build failure
Brought to you by:
egagnon
From: Julio M. M. V. <jm...@me...> - 2004-03-25 19:06:30
|
Hi again ;) the main Makefile.am in sablevm uses m4 to generate the the java-sablevm script, using the following command: m4 -P java-sablevm.m4.sh -DSABLEVM_BINARY=@bindir@/sablevm >java-sablevm As you see, the source file name appears between two options. This doesn't work with NetBSD's m4, as it expects all flags to appear before arguments (that is, it uses the native getopt(3), which is POSIX compliant). This is working in many other systems because they use (probably) GNU m4, and thus use GNU getopt, which recognizes flags in any position (the POSIX behavior can be requested by setting POSIXLY_CORRECT=yes in the environment when running GNU m4, so you should be able to reproduce this). The solution is trivial: just move the source file after the -D flag. The patch below lets it work under NetBSD, fixing a build problem: --- Makefile.am.orig 2004-03-20 23:02:08.000000000 +0100 +++ Makefile.am @@ -21,7 +21,7 @@ BUILT_SOURCES = java-sablevm java-sablevm: java-sablevm.m4.sh rm -f java-sablevm - m4 -P java-sablevm.m4.sh -DSABLEVM_BINARY=@bindir@/sablevm >java-sablevm + m4 -P -DSABLEVM_BINARY=@bindir@/sablevm java-sablevm.m4.sh >java-sablevm chmod a-w java-sablevm ChangeLog: It could be good to have this applied to the sources ;-) Kind regards -- Julio M. Merino Vidal <jm...@me...> The NetBSD Project - http://www.NetBSD.org/ |