583 | | # TODO: Compare the g-ir-generate output |
584 | | ui_debug "universal: merge: ${prefixDir}/${fl} differs in ${base1} and ${base2}; assume trivial difference" |
585 | | copy ${dir1}/${fl} ${dir} |
| 585 | # Compare the g-ir-generate output to see if the contents differ |
| 586 | set tempdir [mkdtemp "/tmp/muniversal.XXXXXXXX"] |
| 587 | set tempfile1 "${tempdir}/${arch1}-[file rootname ${fl}]" |
| 588 | set tempfile2 "${tempdir}/${arch2}-[file rootname ${fl}]" |
| 589 | system "GI_TYPELIB_PATH='[file dirname "${dir1}/${fl}"]' ${prefix}/bin/g-ir-generate \"${dir1}/${fl}\" > \"${tempfile1}\"" |
| 590 | system "GI_TYPELIB_PATH='[file dirname "${dir2}/${fl}"]' ${prefix}/bin/g-ir-generate \"${dir2}/${fl}\" > \"${tempfile2}\"" |
| 591 | set identical "no" |
| 592 | if {![catch {system "/usr/bin/cmp -s \"${tempfile1}\" \"${tempfile2}\""}]} { |
| 593 | # files are identical |
| 594 | ui_debug "universal: merge: ${prefixDir}/${fl} differs in ${base1} and ${base2} but the contents are the same" |
| 595 | set identical "yes" |
| 596 | copy ${dir1}/${fl} ${dir} |
| 597 | } |
| 598 | delete ${tempfile1} ${tempfile2} ${tempdir} |
| 599 | if {${identical} eq "no"} { |
| 600 | return -code error "${prefixDir}/${fl} differs in ${base1} and ${base2} and cannot be merged" |
| 601 | } |