On Mon, Apr 11, 2005 at 08:59:19PM +0200, Alfred M. Szmidt wrote: > How about making MiG ignore any unregogniced options instead?
That's not the problem. mig (the shell script) basically works that way: #v+ [...] until [ $# -eq 0 ] do case "$1" in [...] -imacros ) cppflags="$cppflags $1 $2"; shift; shift;; [...] -* ) cppflags="$cppflags $1"; shift;; * ) files="$files $1"; shift;; esac done for file in $files do $cpp $cppflags "$file" | $migcom $migflags || exit [...] #v- > I think > it should already do that, if it doesn't, then I'd consider it a bug. mig indeed already does that for options consisting of only one argument (they are just added to $cppflags and thus get passed to $cpp), but that rule failes for options that require to have a path name specified after them: 'mig -imacros IMACROFILE -DFOO MIGFILE' needs to be transformed to '$cpp -imacros IMACROFILE -DFOO MIGFILE' and not to '$cpp -imacros -DFOO IMACROFILE MIGFILE' (as it would look like without '-imacros IMACROFILE' getting catched). The same applies to '-isystem ...'. The problem exists because mig has to parse the whole command line to find the options it has to handle itself and the ones that need to be passed to $cpp. To do that properly, it has to know about the structure of the command line. It currently does not know that '-isystem FILE' has to be passed to $cpp as-is, which is what my tiny patch corrected. Conclusion (once again): parsing is ugly and error-prone. If Hurd-L4 still needs MiG, it's command line interface should really be revamped. Regards, Thomas _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd