summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-01-12 23:42:05 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-01-12 23:42:05 +0000
commit41b8c03e40af67d7ab3b2149c7e4dfd380533c5c (patch)
tree2b1df8cc9f431707039bde983a92e9361b897a0b
parent7ddd9614144242b8493e526034be54b636b2b842 (diff)
downloadmultiarch-utils-41b8c03e40af67d7ab3b2149c7e4dfd380533c5c.tar
multiarch-utils-41b8c03e40af67d7ab3b2149c7e4dfd380533c5c.tar.gz
multiarch-utils-41b8c03e40af67d7ab3b2149c7e4dfd380533c5c.tar.bz2
multiarch-utils-41b8c03e40af67d7ab3b2149c7e4dfd380533c5c.tar.xz
multiarch-utils-41b8c03e40af67d7ab3b2149c7e4dfd380533c5c.zip
don't dispatch header file if it's already dispatched to multiarch-ARCH-linux
-rwxr-xr-xmkmultiarch12
1 files changed, 7 insertions, 5 deletions
diff --git a/mkmultiarch b/mkmultiarch
index 8f25e48..00671fe 100755
--- a/mkmultiarch
+++ b/mkmultiarch
@@ -42,14 +42,16 @@ function dispatch_includes() {
while read localfile; do
[[ -f "$incdir/$localfile" ]] && dispatch_includes $incdir/$localfile
done
- # dispatch selected include file
- local archincdir=$prefix/$mplat/$suffix
- [[ -d $archincdir ]] || mkdir -p $archincdir
- mv $file $archincdir/
- cat > $file << EOF
+ # dispatch selected include file, provided it's not already dispatched
+ grep -q _MULTIARCH_HEADER $file || {
+ local archincdir=$prefix/$mplat/$suffix
+ [[ -d $archincdir ]] || mkdir -p $archincdir
+ mv $file $archincdir/
+ cat > $file << EOF
#define _MULTIARCH_HEADER $suffix${file##*/}
#include <multiarch-dispatch.h>
EOF
+ }
}
while [[ $# -gt 0 ]]; do