mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
23 lines
657 B
Bash
Executable File
23 lines
657 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script is for adding an include statement to Makefiles in order
|
|
# to point them at the toplevel rules.mak. It was used to add these
|
|
# lines when rules.mak was introduced.
|
|
|
|
root=${root:-.}
|
|
|
|
files=$(find $root -name '[mM]akefile' | grep -v ./mysql)
|
|
|
|
for x in $files; do
|
|
|
|
istmt=$(dirname $(echo $x | sed -r -e 's,\./,,' -e 's,[^/]+/,\.\./,g'))/rules.mak
|
|
tmpfile=/tmp/setmktop.$UID
|
|
# put new include stmt
|
|
echo "include $istmt" > $tmpfile
|
|
# append the old file less any include rules.mak lines
|
|
grep -v '^include .*rules.mak' $x >> $tmpfile
|
|
# copy over old
|
|
mv $tmpfile $x
|
|
printf "%s %s\n" "$x :" $istmt
|
|
done
|