What causes double slashes in Linux?
Solution 1:
This happens very often and it's harmless. Double slash is interpreted like simple slash.
(see man path_resolution
to understand the path resolution process)
Solution 2:
It's simply the result of concatenating paths as ordinary text strings.
For example, if you specify the destination directory including the ending slash...
make DESTDIR=/usr/local/games/enemy-territory/ install
...and the installer uses it like this:
$(DESTDIR)/tcetest/pak3.pk3
When the line above gets expanded, $(DESTDIR)
simply will be replaced with the exact contents of the variable, resulting in:
/usr/local/games/enemy-territory//tcetest/pak3.pk3
As Stéphane mentioned in their answer, having two slashes in a path is entirely harmless, which is why most install scripts don't bother with removing them.