Thanks Dave.
I followed your instructions with the makefile , and it also compiles and works here.
But I don't understand this part:
ps to patch, IIRC,
%UNIXROOT%\usr\bin\patch.exe -p0 < makefile.diff
Got to avoid the patch.exe in \os2.
To be honest I haven't used patch.exe never, I was changing the makefile at hand.
This is to automatically make the update/changes on the makefile, right?
Yes, it could also be a patch for the whole directory. Options include --dry-run, to see what will happen with no actual changes. Git format patches need -p1 instead of -p0, it is related to the depth of the subdirectory. For large patches it doesn't hurt to capture the output by redirecting stdout and stderr. If the patch fails, it will leave files like makefile.org and makefile.rej so you can revert or fix by hand.
What is your technique to generate the changes between makefile.orig and the current makefile as you are attaching on the forum ?
Yes, to catch the changes, something like cp makefile makefile.orig (could be makefile.bak or whatever), then after making changes,
diff -u makefile.orig makefile > makefile.patch
Can also do whole directories, cp newfilemanager/ newfilemanager.orig or such, then from above the directory,
diff -ru newfilemanager/ newfilemanager.orig/ > newfilemanager.diff
Which made a huge patch here. Make clean did not clean everything is the big problem, in both directories. There's other options such as -w to ignore white space, which IIRC includes line endings
diff --help | less to see all the options
There's also git diff, svn diff and such to create similar patches that can be applied much the same way tasking care with the -p parameter. Patch will let you know if it can't find the files to patch or ask about a reversed patch if already applied. Reversed patching undoes a patch, see the help.