[Omake] Newbie: removing quotes for command
Hugo Ferreira
hmf at inescporto.pt
Wed Mar 21 07:00:54 PDT 2007
Hello,
Apologies for the very basic question I have but I just cannot seem to
solve it. I am including a file with omake code as follows:
%.cmx %.o: %.ml
$(OCAMLOPT) $(INCLUDE) $(OFLAGS) -c $<
In the main file I include it with:
include ../OMakefile.shared
Now I have the following variable
INCLUDES += ../res_stck ../qalist ../term ../symbl_tbl ../compile
and would like to use it to set INCLUDE (used in ../OMakefile.shared) to:
INCLUDE = -I ../res_stck -I ../qalist -I ../term -I ../symbl_tbl -I
../compile
I have used:
INCLUDE = $(addprefix -I , $(INCLUDES))
and
INCLUDE = $(mapprefix -I , $(INCLUDES))
But when the target executes I get:
ocamlc "-I " . "-I " ../res_stck "-I " ../qalist "-I " ../term "-I "
../symbl_tbl "-I " ../compile -dtypes -g -c parser.mli
...which breaks. How do I get rid of the quotes to obtain:
ocamlc -I . -I ../res_stck -I ../qalist -I ../term -I ../symbl_tbl -I
../compile -dtypes -g -c parser.mli
I have even attempted to use my own function:
F(X, Y) =
T =
foreach (Z, $(X))
T = $(T)$(Y)$(Z)
#INCLUDE = $( F $(INCLUDES), -I )
But to no effect.
Can anyone also explain how/why/when values are converted to/from a string?
TIA.
Hugo F.
More information about the Omake
mailing list