Sentence:  It means to do it and to know one is <WSD>doing</WSD> it , but as only a secondary if certain effect of the good one primarily does and intends . 
Meaning of the word marked with <WSD> tags:  engage in