What happens if a Makefile has no target at all? Let's say it's
blank. You might see this:
make: *** No targets. Stop.
But then what about an empty target? Say say:
default:
You might get a message like:
make: Nothing to be done for `default'.
On some systems that was it. On others it was as if I had that
Makefile but a line break after it (so two lines):
default:
That would then create a mysterious file called .Makefile.un~. Now what
on Earth is that about? I honestly do not know but here are some curious
facts about it.
First of all the type according to the file(1) command:
.Makefile.un~: data
Second is if I open it in vim I see at the beginning the string
'Vim'. Then there's a non-printable byte and then the text
UnDoƄ followed by more unprintable bytes and then the next
text that's somewhat sensible is default:5. Finally running
strings(1) on it shows:
UnDo
hd6.
default:5
Note that if other valid Makefile content is in the Makefile, say
CFLAGS, that's also embedded in this data file.
But hang on a moment. What happened to the string 'Vim'? That's a
really curious question and one I do not know the answer to! In fact
opening it in another editor that I installed temporarily (i.e. nano) it
still has the string 'Vim'. Furthermore opening it in a hex editor also
has it and it includes the same bytes that `od` does too! I cannot
explain this but I find it incredibly curious and I thought it worth
sharing.
Feel free to download the data file here.
I don't know if it'll be saved correctly but either way it's a mystery to me.