Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | Lars> I thought we already required bash in some other scripts? > | If we do, we should not. > | Lars> what is requried is a rewrite of the construct: | Lars> ${TMPCMD/$PATTERN} > | Lars> something similar to > | Lars> $tmp=`echo $TMPCMD | sed -e "s/$PATTERN//"` ; $tmp > | Lars> Last time I tried this I had a lot of trouble. > | Could you describe the goal of the original code in common.am?
You snipped to much... $(PCH_FILE): $(PCH_SOURCE) TMPCMD=` echo $(CXXCOMPILE) | sed -e s,\",\',` ; \ PATTERN=`echo $(PCH_FLAGS) | sed -e 's,\/,\\\/,'` ; \ $${TMPCMD/$$PATTERN} \ -x c++-header $(PCH_SOURCE) -MT $@ -MD -MP -MF "./[EMAIL PROTECTED]" \ && mv "./[EMAIL PROTECTED]" "./[EMAIL PROTECTED]" || rm "./[EMAIL PROTECTED]" The thing is that we want to use the most stock compile line we can get and therefor want to use the variables generated by automake: CXXCOMPILE. The problem is that this command also contains the PCH_FLAGS from common.am, and we absolutely do not want them when generating/compiling the precompiled header. So to fix this we do some sed magic/shell substitution and remove the PCH_FLAGS from the compile command. Clear now? -- Lgb