redirecting .hi
I asked earlier how to replace in Makefile many lines of kind source/Categs_flags = -ohi $(E)/Categs.hi source/auxil/Set__flags = -ohi $(E)/Set_.hi ... (processed by the $($*_flags) compilation key) with something short. Thanks to Marc Van Dongen, Simon Marlow, Sigbjorn Finne for the advices. Sigbjorn Finne writes If you're using GNU make I'd simply add SRC_HC_OPTS += -ohi $(E)/$*.hi I found that it does almost what is needed. Only it has to be corrected to -ohi $(E)/$(notdir $*).hi Thanks. -- Sergey Mechveliani [EMAIL PROTECTED]
RE: redirecting *.hi
Simon Marlow [EMAIL PROTECTED] writes: Sergey: One small correction: The sed script should be: sed -e 's/.*\/\([^\/][^\/]*\)\.hs/$(E)\/\1.o, $(E)\/\1.hi/' Of course: :g/.*\/\([^\/][^\/]*\)\.hs/s//$(E)\/\1.o, $(E)\/\1.hi/ in vi should also work. -odir blah is supposed to work, I think. Not for the gen'ed interface file. If you're using GNU make I'd simply add SRC_HC_OPTS += -ohi $(E)/$*.hi and avoid having to supply them on a case-by-case basis. --sigbjorn
RE: redirecting *.hi
Sergey: One small correction: The sed script should be: sed -e 's/.*\/\([^\/][^\/]*\)\.hs/$(E)\/\1.o, $(E)\/\1.hi/' Of course: :g/.*\/\([^\/][^\/]*\)\.hs/s//$(E)\/\1.o, $(E)\/\1.hi/ in vi should also work. -odir blah is supposed to work, I think. Cheers, Simon
Re: redirecting *.hi
Sergey: One small correction: The sed script should be: sed -e 's/.*\/\([^\/][^\/]*\)\.hs/$(E)\/\1.o, $(E)\/\1.hi/' Of course: :g/.*\/\([^\/][^\/]*\)\.hs/s//$(E)\/\1.o, $(E)\/\1.hi/ in vi should also work. Regards, Marc