Narrow-down of a patch problem I am trying to troubleshoot: Only two files, each with a size of 1 byte:
- file
a
(containing'a'
) - file
b
(containing'b'
) and
Goal is to make and then apply a patch that will change the value of 'b'
to 'a'
. Contents of Makefile are:
patch:
diff -u b a > b2a.patch
patch -o b.corrected b < b2a.patch
diff a b.corrected
clean:
rm -f b2a.patch b.corrected
Given the above, make
fails with the following output:
$ make
diff -u b a > b2a.patch
make: *** [patch] Error 1
If, however, I execute the commands in the Makefile one after the other on the bash shell, there is no problem at all.
exit code
ofdiff
when you run it manually?cp
? Since that doesn't really make much sense, I assume this is a simplified test case.