On 25 Apr 2002 14:08:10 -0700, 
Thomas Duffy <[EMAIL PROTECTED]> wrote:
>cp: cannot create regular file
>`/tmp/newkbuild/scripts/pp_makefile2_parse.tab.c': Permission denied

Use cp -f, mv -f.

Index: 18.57/scripts/Makefile-2.5
--- 18.57/scripts/Makefile-2.5 Fri, 26 Apr 2002 01:01:04 +1000 kaos 
(linux-2.4/I/d/23_Makefile-2 1.39.1.3.3.19 644)
+++ 18.57(w)/scripts/Makefile-2.5 Fri, 26 Apr 2002 08:19:28 +1000 kaos 
+(linux-2.4/I/d/23_Makefile-2 1.39.1.3.3.19 644)
@@ -62,7 +62,7 @@ $(scripts_objtree).tmp_pp_flags.h_new: F
        @echo "'$(pp_flags)'" > $@
 
 $(scripts_objtree).tmp_pp_flags.h: $(scripts_objtree).tmp_pp_flags.h_new
-       @cmp -s $< $@ || mv $< $@
+       @cmp -s $< $@ || mv -f $< $@
 
 $(scripts_objtree)pp_env.o:    $(scripts_srctree)pp_env.c \
                $(pp_deps)
@@ -197,7 +197,7 @@ $(scripts_objtree)pp_makefile2_parse_sum
 
 $(scripts_objtree)pp_makefile2_parse.lex.c: $(scripts_objtree)pp_makefile2_parse_sum.d
        $(KBUILD_QUIET)[ "`cat $<`" = 'S OK' ] && \
-         (cp $(scripts_srctree)$(@F)_shipped $@) || \
+         (cp -f $(scripts_srctree)$(@F)_shipped $@) || \
          (set -ex; $(LEX) $(LFLAGS) -t $(scripts_srctree)pp_makefile2_parse.l > $@)
 
 .SECONDARY:    $(scripts_objtree)pp_makefile2_parse.lex.c
@@ -225,8 +225,8 @@ $(scripts_objtree)pp_makefile2_parse.lex
 $(scripts_objtree)pp_makefile2_parse.tab.c: $(scripts_objtree)pp_makefile2_parse_sum.d
        $(KBUILD_QUIET)[ "`cat $<`" = 'S OK' ] && \
          (set -e; \
-           cp $(scripts_srctree)pp_makefile2_parse.tab.c_shipped 
$(scripts_objtree)pp_makefile2_parse.tab.c; \
-           cp $(scripts_srctree)pp_makefile2_parse.tab.h_shipped 
$(scripts_objtree)pp_makefile2_parse.tab.h) || \
+           cp -f $(scripts_srctree)pp_makefile2_parse.tab.c_shipped 
+$(scripts_objtree)pp_makefile2_parse.tab.c; \
+           cp -f $(scripts_srctree)pp_makefile2_parse.tab.h_shipped 
+$(scripts_objtree)pp_makefile2_parse.tab.h) || \
          (set -ex; \
            $(YACC) $(YFLAGS:%-y=% ) -t -d -b $(scripts_objtree)pp_makefile2_parse 
$(scripts_srctree)pp_makefile2_parse.y)
 
@@ -258,18 +258,18 @@ $(scripts_srctree)pp_makefile2_parse_sum
                $(scripts_objtree)pp_makefile2_parse.tab.c
        @$(check_writable)
        @cmp -s $(scripts_objtree)pp_makefile2_parse.lex.c 
$(scripts_srctree)pp_makefile2_parse.lex.c_shipped || \
-            mv $(scripts_objtree)pp_makefile2_parse.lex.c 
$(scripts_srctree)pp_makefile2_parse.lex.c_shipped
+            mv -f $(scripts_objtree)pp_makefile2_parse.lex.c 
+$(scripts_srctree)pp_makefile2_parse.lex.c_shipped
        @cmp -s $(scripts_objtree)pp_makefile2_parse.tab.h 
$(scripts_srctree)pp_makefile2_parse.tab.h_shipped || \
-            mv $(scripts_objtree)pp_makefile2_parse.tab.h 
$(scripts_srctree)pp_makefile2_parse.tab.h_shipped
+            mv -f $(scripts_objtree)pp_makefile2_parse.tab.h 
+$(scripts_srctree)pp_makefile2_parse.tab.h_shipped
        @cmp -s $(scripts_objtree)pp_makefile2_parse.tab.c 
$(scripts_srctree)pp_makefile2_parse.tab.c_shipped || \
-            mv $(scripts_objtree)pp_makefile2_parse.tab.c 
$(scripts_srctree)pp_makefile2_parse.tab.c_shipped
+            mv -f $(scripts_objtree)pp_makefile2_parse.tab.c 
+$(scripts_srctree)pp_makefile2_parse.tab.c_shipped
        @( \
                set -e; \
                cat $(pp_makefile2_parse_files) > 
$(scripts_objtree).tmp_pp_makefile2_parse_files; \
                (cd $(KBUILD_OBJTREE) && $(MD5SUM) 
scripts/.tmp_pp_makefile2_parse_files > $(scripts_objtree).tmp_$(@F)); \
                cmp -s $(scripts_objtree).tmp_$(@F) 
$(scripts_srctree)pp_makefile2_parse_sum || \
                        (echo Updating checksum for pp_makefile2_parse; \
-                        mv $(scripts_objtree).tmp_$(@F) 
$(scripts_srctree)pp_makefile2_parse_sum); \
+                        mv -f $(scripts_objtree).tmp_$(@F) 
+$(scripts_srctree)pp_makefile2_parse_sum); \
        )
        @rm -f $(scripts_objtree)pp_makefile2_parse_sum.d $(scripts_objtree).tmp_$(@F) 
$(scripts_objtree).tmp_files_$(@F)
 
@@ -507,7 +507,7 @@ tmp_config_copyout  := cd $(KBUILD_OBJTRE
                           cpio -pmd $(tmp_config_links) 2>&1 | \
                           (egrep -v 'newer or same age| blocks$$|No such file or 
directory' || /bin/true)
 tmp_config_copyback    := for i in $(tmp_config_files); \
-                          do [ -r $(tmp_config_links)$$i ] && mv 
$(tmp_config_links)$$i $(KBUILD_OBJTREE)$$i; done
+                          do [ -r $(tmp_config_links)$$i ] && mv -f 
+$(tmp_config_links)$$i $(KBUILD_OBJTREE)$$i; done
 
 lxdialog-srctree       := $(scripts_srctree)lxdialog/
 lxdialog-objtree       := $(scripts_objtree)lxdialog/
@@ -817,7 +817,7 @@ $(tmp_config_links): $(KBUILD_OBJTREE).t
          echo "default INSTALL_SCRIPT_NAME from \"\""; \
          echo "unless VMLINUX!=y suppress INSTALL_VMLINUX"; \
        ) >> $@/.tmp_rules-2.5.cml
-       @cmp -s $@/.tmp_rules-2.5.cml $@/rules-2.5.cml || mv $@/.tmp_rules-2.5.cml 
$@/rules-2.5.cml
+       @cmp -s $@/.tmp_rules-2.5.cml $@/rules-2.5.cml || mv -f $@/.tmp_rules-2.5.cml 
+$@/rules-2.5.cml
 
 archsymbol     := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/sparc$$/sparc32/ -e 
s/mips$$/mips32/ | tr "[a-z]" "[A-Z]")
 cmlopts                := -D$(archsymbol) -B $(KERNELRELEASE) $(CONFIGOPTS) rules.out
@@ -836,8 +836,8 @@ $(tmp_config_links)rules.out: $(KBUILD_O
        @[ $(tmp_config_links)rules-2.5.cml -ot $@ ] || rm -f 
$(KBUILD_OBJTREE).tmp_rules.out
        @cmp -s $(KBUILD_OBJTREE).tmp_rules.out_new $(KBUILD_OBJTREE).tmp_rules.out || 
\
           (cd $(tmp_config_links); $(PYTHON2) -O scripts/cmlcompile.py rules-2.5.cml 
&& \
-             cp rules.out $(KBUILD_OBJTREE) && \
-             mv $(KBUILD_OBJTREE).tmp_rules.out_new $(KBUILD_OBJTREE).tmp_rules.out)
+             cp -f rules.out $(KBUILD_OBJTREE) && \
+             mv -f $(KBUILD_OBJTREE).tmp_rules.out_new 
+$(KBUILD_OBJTREE).tmp_rules.out)
 
 # Some users will edit .config instead of config.out and will be confused if the
 # change is not detected.  Until we can get rid of .config, check which of the
@@ -848,10 +848,10 @@ $(tmp_config_links)rules.out: $(KBUILD_O
 create_config_out: $(tmp_config_links)rules.out
        @cd $(tmp_config_links); \
          [ -s .config -o -s config.out ] || \
-           (cp arch/$(ARCH)/defconfig .config && echo "Copying defconfig to .config")
+           (cp -f arch/$(ARCH)/defconfig .config && echo "Copying defconfig to 
+.config")
        @cd $(tmp_config_links); \
          [ -s .config -o ! -s config.out ] || \
-           (cp -a config.out .config && echo "Copying config.out to .config")
+           (cp -f -a config.out .config && echo "Copying config.out to .config")
        @cd $(tmp_config_links); \
          if [ -e .config -a -e config.out -a .config -nt config.out ]; then \
             echo "Warning: .config is newer than config.out, should not happen" >&2; \
@@ -1024,7 +1024,7 @@ else
   ifeq ($(KBUILD_WRITABLE),y)
        @echo export ARCH=\'$(ARCH)\' AS=\'$(AS)\' LD=\'$(LD)\' CC=\'$(CC)\' 
CPP=\'$(CPP)\' AR=\'$(AR)\' HOSTAS=\'$(HOSTAS)\' HOSTLD=\'$(HOSTLD)\' 
HOSTCC=\'$(HOSTCC)\' HOSTAR=\'$(HOSTAR)\' \\ > $@.new
        @echo LC_COLLATE=\'$(LC_COLLATE)\' KBUILD_WRITABLE=\'$(KBUILD_WRITABLE)\' 
arch_head=\'$(arch_head)\' >> $@.new
-       @(cmp -s $@.new $@ && rm $@.new) || mv $@.new $@
+       @(cmp -s $@.new $@ && rm $@.new) || mv -f $@.new $@
        @sed -ne "1{s/export/Using/; s/ \\\\//; p;}" $@
 else
        @/bin/true
@@ -1051,7 +1051,7 @@ else
 # into $(scripts_objtree).  It does not matter if Python writes .py[co] to that
 # directory.
        @rm -f $(scripts_objtree)*.py
-       @cp -a $(scripts_srctree)*.py $(scripts_objtree)
+       @cp -f -a $(scripts_srctree)*.py $(scripts_objtree)
       endif
     endif
        @cd $(KBUILD_OBJTREE) && $(KBUILD_TIME) $(scripts_objtree)pp_makefile1 
$(PP_MAKEFILE1_FLAGS)
Index: 18.57/scripts/pp_makefile2_parse.y
--- 18.57/scripts/pp_makefile2_parse.y Thu, 25 Apr 2002 15:29:24 +1000 kaos 
(linux-2.4/T/f/51_pp_makefil 1.10 644)
+++ 18.57(w)/scripts/pp_makefile2_parse.y Fri, 26 Apr 2002 08:19:47 +1000 kaos 
+(linux-2.4/T/f/51_pp_makefil 1.10 644)
@@ -905,7 +905,7 @@ shipped
                for (text = shipped_generated; *text; ++text) {
                        if (!isspace(**text)) {
                                fprintf(y_feedback,
-                                       "\t    cp $(srcfile %s_shipped) $(objfile 
%s);\n",
+                                       "\t    cp -f $(srcfile %s_shipped) $(objfile 
+%s);\n",
                                        *text, *text);
                        }
                }
@@ -933,7 +933,7 @@ shipped
                                        "\t@cmp -s $(objfile %s) $(srcfile %s_shipped) 
|| \\\n",
                                        *text, *text);
                                fprintf(y_feedback,
-                                       "\t     mv $(objfile %s) $(srcfile 
%s_shipped)\n",
+                                       "\t     mv -f $(objfile %s) $(srcfile 
+%s_shipped)\n",
                                        *text, *text);
                        }
                }
@@ -949,7 +949,7 @@ shipped
                fprintf(y_feedback, "\t    (echo Updating checksum for %s; \\\n",
                        *shipped_prefix);
                fprintf(y_feedback,
-                       "\t    mv $(objfile .tmp_$(@F)) $(srcfile %s_sum)))\n",
+                       "\t    mv -f $(objfile .tmp_$(@F)) $(srcfile %s_sum)))\n",
                        *shipped_prefix);
                fprintf(y_feedback,
                        "\t@rm -f $(objfile %s_sum.d) $(objfile .tmp_$(@F) $(objfile 
.tmp_%s_files))\n",
@@ -1077,7 +1077,7 @@ update_if_changed
                                target1 + 1, p);
                }
                fprintf(yyout,
-                       "\t$(KBUILD_QUIET)cmp -s $< $@ || (($(check_writable);) && 
echo \"  Updating $@\" && cp $< $@)\n\n");
+                       "\t$(KBUILD_QUIET)cmp -s $< $@ || (($(check_writable);) && 
+echo \"  Updating $@\" && cp -f $< $@)\n\n");
                fprintf(yyout, "# nodepend(%s)\n", target1);
                do_nodepend(target1);
                fprintf(yyout, "CLEAN\t+= %s\n", target1 + 1);


_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to