Makefile tricks

Simon Marlow simonmar@microsoft.com
Wed, 20 Mar 2002 15:12:23 -0000


> (RedHat-6.1 Linux machine, libc-2.1.2),
>=20
> Can you, please explain the following effect
>=20
>    Main.hs:   main =3D putStr "hello\n"
>=20
>    Makefile:=20
>    ---------
>    obj:
>           ghc -c -O Main.hs  +RTS -M10m -RTS
>=20
>    -- Running --------------------
>    $ tcsh
>    > make obj
>    ghc -c -O Main.hs  +RTS -M10m -RTS
>    ghc: input file doesn't exist: +RTS
>    ghc: unrecognised option: -M10m
>    ghc: unrecognised option: -RTS

It looks like 'make' is using a different PATH setting than the one in
effect at the shell prompt, and hence getting a different 'ghc'.

Cheers,
	Simon