[Libreoffice-commits] dev-tools.git: make-3.82-gbuild/runbuiltin.c
LuboÅ¡ LuÅák
l.lunak at suse.cz
Mon Mar 4 05:07:22 PST 2013
make-3.82-gbuild/runbuiltin.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit 4b58fde87b2710e665b86e91f559744ac8034791
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 4 14:05:00 2013 +0100
cp -f <src> <dest> as make builtin as well
diff --git a/make-3.82-gbuild/runbuiltin.c b/make-3.82-gbuild/runbuiltin.c
index 70dff3d..33eeecd 100644
--- a/make-3.82-gbuild/runbuiltin.c
+++ b/make-3.82-gbuild/runbuiltin.c
@@ -480,6 +480,7 @@ int try_run_as_builtin( char** orig_argv )
builtin = 1;
}
/* cp <srcfile> <destfile> */
+ /* cp -f <srcfile> <destfile> */
/* cp [--remove-destination] --no-dereference --force --preserve=timestamps <srcfile> <destfile> */
else if( equals( argv[ 0 ], "/usr/bin/cp" ) || equals( argv[ 0 ], "/bin/cp" ) || equals( argv[ 0 ], "cp" ))
{
@@ -495,6 +496,20 @@ int try_run_as_builtin( char** orig_argv )
#else
builtin = 1;
#endif
+ } else if( equals( argv[ 1 ], "-f" )
+ && argv[ 2 ] != NULL
+ && argv[ 3 ] != NULL
+ && argv[ 4 ] == NULL )
+ {
+#ifdef MYWIN
+ const char* srcfile = argv[ 2 ];
+ const char* destfile = argv[ 3 ];
+ DeleteFile( destfile );
+ if( CopyFile( srcfile, destfile, 0 ))
+ builtin = 1;
+#else
+ builtin = 1;
+#endif
}
else
{
More information about the Libreoffice-commits
mailing list