File tree Expand file tree Collapse file tree 5 files changed +11
-20
lines changed
resources/projB/cpplib3/patches Expand file tree Collapse file tree 5 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 7
7
< links>
8
8
< link name= " parent" > 7bc74cc796c455a46d699ad91f6aca5b7c790f56a6a0968b4ecbce33e fce9d25< / link>
9
9
< / links>
10
- < cf v= " fred322 2025-06-24T17:53:31 +02:00" / >
10
+ < cf v= " fred322 2025-07-03T15:35:07 +02:00" / >
11
11
< / cr>
Original file line number Diff line number Diff line change @@ -107,13 +107,12 @@ $(ARCHSRC_INCLUDESFILES): $(ARCHSRC_EXTRACTED_INFO) $(ARCHSRC_INCLUDES_EXTRACTED
107
107
# 1: sources originals directory
108
108
# 2: sources modified directory
109
109
define generatePatchesFor
110
- for file in `find $( 1 ) -type f`; do \
110
+ for file in `find $1 -type f`; do \
111
111
relativePath=`echo $$file | sed 's~$(1 ) /~~g'` && \
112
- if [ `diff -q $$file $( 2 ) /$$relativePath | wc -l` -ne 0 ]; then \
112
+ if [ `diff -q $$file $2 /$$relativePath | wc -l` -ne 0 ]; then \
113
113
$(ABS_PRINT_info ) "Generating patch for $$relativePath";\
114
114
mkdir -p $(ARCHSRC_GENE_PATCHES_OUT ) /`dirname $$relativePath` && \
115
- diff -Naur $$file $(2 ) /$$relativePath > $(ARCHSRC_GENE_PATCHES_OUT ) /$$relativePath.patch; \
116
- sed -i -e 's~$(1 ) /~~g' -e 's~$(2 ) /~~g' $(ARCHSRC_GENE_PATCHES_OUT ) /$$relativePath.patch; \
115
+ diff --label $$relativePath --label $$relativePath -Nau $$file $2/$$relativePath > $(ARCHSRC_GENE_PATCHES_OUT ) /$$relativePath.patch || :; \
117
116
fi; \
118
117
done
119
118
endef
Original file line number Diff line number Diff line change 1
- --- subdir/inc.h 2025-03-13 09:23:48.012321627 +0100
2
- +++ subdir/inc.h 2025-03-13 09:25:33.896319205 +0100
1
+ --- subdir/inc.h
2
+ +++ subdir/inc.h
3
3
@@ -1,6 +1,4 @@
4
4
#pragma once
5
5
Original file line number Diff line number Diff line change 1
- --- subdir2/source2.cpp 2025-03-13 09:33:38.892308112 +0100
2
- +++ subdir2/source2.cpp 2025-03-13 09:33:54.544307754 +0100
1
+ --- subdir2/source2.cpp
2
+ +++ subdir2/source2.cpp
3
3
@@ -1,7 +1,9 @@
4
4
#include "subdir/inc2.h"
5
5
Original file line number Diff line number Diff line change 28
28
testFileExists $projBOUtPatchesDir /subdir2/source2.cpp.patch
29
29
testFileExists $projBOUtPatchesDir /subdir/inc.h.patch
30
30
31
- function removeDateFromPatch {
32
- head -n 2 $1 | sed ' s/\t.*//g' > $2
33
- tail -n +3 $1 >> $2
34
- }
35
31
36
- removeDateFromPatch cpplib3/patches/subdir2/source2.cpp.patch $projBOUtPatchesDir /subdir2/source2.expected
37
- removeDateFromPatch cpplib3/patches/subdir/inc.h.patch $projBOUtPatchesDir /subdir/inc.expected
38
- removeDateFromPatch $projBOUtPatchesDir /subdir2/source2.cpp.patch $projBOUtPatchesDir /subdir2/source2.generated
39
- removeDateFromPatch $projBOUtPatchesDir /subdir/inc.h.patch $projBOUtPatchesDir /subdir/inc.generated
40
-
41
- testFile $projBOUtPatchesDir /subdir2/source2.expected $projBOUtPatchesDir /subdir2/source2.generated
42
- testFile $projBOUtPatchesDir /subdir/inc.expected $projBOUtPatchesDir /subdir/inc.generated
32
+ echo " #### Test patches"
33
+ testFile $projBOUtPatchesDir /subdir2/source2.cpp.patch $MODROOT /test/resources/projB/cpplib3/patches/subdir2/source2.cpp.patch
34
+ testFile $projBOUtPatchesDir /subdir/inc.h.patch $MODROOT /test/resources/projB/cpplib3/patches/subdir/inc.h.patch
43
35
44
36
doExit 0
You can’t perform that action at this time.
0 commit comments