# switches: -E : Stop after preprocess # -C : Do not strip comments. # -P : Do not generate line markers # -traditional-cpp : preserve white space # run the pre-processor to generate the vector ops documentation gcc -E -C -P -traditional-cpp -o temp.h ../src/vop/cmVectOpsDoc.h # The --traditional-cpp switch prevents the 'stringizing' # C pre-proc direcive from working this leaves '##_' tokens # which need to be replaced by '_' # replace '_##` with '_' sed 's/\(_##\)/_/g' temp.h > temp1.h # Remove header text generated by gcc. # sed '/\/\*/,/\/\/end_cut/{#!d}' temp.h sed '/\/\*/,/\/\/end_cut/{//!d;};' temp1.h > temp2.h # Remove the first two lines. tail -n +3 temp2.h > ../src/cmVectOpsDocOut.h rm -f temp.h rm -f temp1.h rm -f temp2.h # Run the doc generator #cdg -c cdg_cfg.json -o ~/temp/doc_libcm