summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-24 09:42:06 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-24 09:42:06 +0000
commitfbd897d7f98b13640f714ef8436dbb60e5df7ce5 (patch)
tree3a03aed427b648b61d211bd646ccba8852d43583 /contrib
parent79e0cff74052972ae3794cdb4791864d406d16ec (diff)
downloadgcc-fbd897d7f98b13640f714ef8436dbb60e5df7ce5.tar.gz
[contrib/]
2012-09-24 Basile Starynkevitch <basile@starynkevitch.net> * make-melt-plugin-source-tar.sh: If the first argument is -l do symlinking instead of copying. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191660 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog.MELT5
-rwxr-xr-xcontrib/make-melt-plugin-source-tar.sh14
2 files changed, 17 insertions, 2 deletions
diff --git a/contrib/ChangeLog.MELT b/contrib/ChangeLog.MELT
index 31ede4c8013..62535d10df7 100644
--- a/contrib/ChangeLog.MELT
+++ b/contrib/ChangeLog.MELT
@@ -1,4 +1,9 @@
+2012-09-24 Basile Starynkevitch <basile@starynkevitch.net>
+
+ * make-melt-plugin-source-tar.sh: If the first argument is -l do
+ symlinking instead of copying.
+
2012-09-19 Basile Starynkevitch <basile@starynkevitch.net>
* MELT-Plugin-Makefile (all): Improve messages.
diff --git a/contrib/make-melt-plugin-source-tar.sh b/contrib/make-melt-plugin-source-tar.sh
index 85e2ba6a3cb..eb82f282238 100755
--- a/contrib/make-melt-plugin-source-tar.sh
+++ b/contrib/make-melt-plugin-source-tar.sh
@@ -7,7 +7,7 @@
##
## Middle End Lisp Translator = MELT
##
-## Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+## Copyright (C) 2010 - 2012 Free Software Foundation, Inc.
## Contributed by Basile Starynkevitch <basile@starynkevitch.net>
##
## This file is part of GCC.
@@ -26,6 +26,16 @@
## along with GCC; see the file COPYING3. If not see
## <http://www.gnu.org/licenses/>.
+
+## if the first argument is -l, we are using symlinks instead of copying
+
+if [ "$1" = "-l" ]; then
+ gccmelt_copy="ln -svf"
+ shift
+else
+ gccmelt_copy="cp -av"
+fi
+
## the first argument of this script is the source tree of the GCC
## MELT branch from which is extracted the MELT plugin source, for
## instance /usr/src/Lang/gcc-melt
@@ -71,7 +81,7 @@ date +"source tar timestamp %c" > $gccmelt_tarbase/GCCMELT-SOURCE-DATE
copymelt() {
if [ -f $gccmelt_source_tree/$1 ]; then
- cp -av $gccmelt_source_tree/$1 $gccmelt_tarbase/$2
+ $gccmelt_copy $gccmelt_source_tree/$1 $gccmelt_tarbase/$2
fi
}