summaryrefslogtreecommitdiffstats
path: root/scripts/create_makefiles
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/create_makefiles
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/create_makefiles')
-rwxr-xr-xscripts/create_makefiles34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/create_makefiles b/scripts/create_makefiles
new file mode 100755
index 00000000..955edb90
--- /dev/null
+++ b/scripts/create_makefiles
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Usage : create_makefiles dir
+# (to be run from toplevel directory)
+# Will re-create all Makefiles in dir and its subdirs
+# Needs create_makefile in the path.
+#
+# David Faure <faure@kde.org>
+
+if test ! -f Makefile && test -n "$OBJ_REPLACEMENT"; then
+ objdir=`pwd | sed -e "$OBJ_REPLACEMENT"`
+ cd $objdir
+fi
+
+if test ! -f Makefile && test -n "$OBJ_SUBDIR"; then
+ cd $OBJ_SUBDIR
+fi
+
+if test ! -f Makefile; then
+ echo "$0: in the current directory there is no Makefile"
+ echo "you will have to run it from the top build dir."
+ echo "if you do not have a Makefile there - rerun configure"
+ exit
+fi
+
+srcdir=`egrep '^srcdir *=' Makefile | sed -e "s#srcdir *= *##"`
+
+( cd $srcdir ; find $1 -type d | sed -e 's,/$,,' ) | \
+ while read a; do
+ if test -f "$srcdir/$a/Makefile.am"; then
+ test -d "$a" || mkdir -p "$a"
+ create_makefile "$a/Makefile"
+ fi
+ done
+