xaizek / zograscope (License: AGPLv3 only) (since 2018-12-07)
Mainly a syntax-aware diff that also provides a number of additional tools.
Commit 6b1e7605dbd0b5bfdfd8ebafd656f77b5edeb43c

Tokenize word in a recipe's line in Makefiles
Container was missing and tokens were glued which prevented diffing.
Author: xaizek
Author date (UTC): 2022-11-29 19:15
Committer name: xaizek
Committer date (UTC): 2022-11-29 19:15
Parent(s): df7cf95a1a5c1f416004139660efa6fa7de11a0f
Signing key: 99DC5E4DB05F6BE2
Tree: 31c2d6b8fb23b8e12d565aec90d25028b717c143
File Lines added Lines deleted
src/make/make-parser.ypp 4 2
tests/make/make-parsing.cpp 15 0
File src/make/make-parser.ypp changed (mode: 100644) (index b74672c..dfc156f)
... ... mid_recipes
737 737 ; ;
738 738
739 739 recipes_opt recipes_opt
740 : comment_opt NL { $$ = $1; }
741 | comment_opt recipes NL { $$ = tb->addNode({ $1, $2 }); }
740 : comment_opt NL
741 { $$ = $1; }
742 | comment_opt recipes NL
743 { $$ = tb->addNode({ $1, $2 }, +MakeSType::TemporaryContainer); }
742 744 ; ;
743 745
744 746 recipe recipe
File tests/make/make-parsing.cpp changed (mode: 100644) (index a786823..49180e5)
... ... target:
58 58 # echo '#define HAVE_FILE_PROG' >> $@; # echo '#define HAVE_FILE_PROG' >> $@;
59 59 )"); )");
60 60 } }
61
62 TEST_CASE("Lines of recipes are tokenized", "[make][comparison][parsing]")
63 {
64 diffMake(R"(
65 a: b
66 ifeq ($(VAR),)
67 cp from to
68 endif
69 )", R"(
70 a: b
71 ifeq ($(VAR),)
72 cp -r from to ## Mixed
73 endif
74 )");
75 }
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/zograscope

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/zograscope

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master