rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
693 stars 126 forks source link

`make` - dealing with absolute path in target name #353

Closed naksyl closed 10 months ago

naksyl commented 1 year ago

make applet recognize absolute path as 2 items:

Example:

$ cat Makefile

startdir = $(PWD)

$(startdir)/file:
        echo $@

# single letter target name test
z:
    echo $@

$ echo pwd=$PWD; make; make z

pwd=C:/Users/naksyl/Projekty/dbuild/make/pkg
make: nothing to be done for /Users/naksyl/Projekty/dbuild/make/pkg/file:
echo C
C
echo z
z

mingw32-make from w64devkit and 'posix' make from msys (through the magic of path conversion i guess) handle this Makefile correctly: echo pwd=$PWD; c:/w64devkit/bin/mingw32-make.exe; c:/w64devkit/bin/mingw32-make.exe z

pwd=C:/Users/naksyl/Projekty/dbuild/make/pkg
echo C:/Users/naksyl/Projekty/dbuild/make/pkg/file
C:/Users/naksyl/Projekty/dbuild/make/pkg/file
echo z
z
rmyorston commented 1 year ago

The latest prerelease binaries allow target names of the form c:/path as a non-POSIX extension.

naksyl commented 1 year ago

Target names of the form c:path aren't allowed, but it's probably unwise to use them.

Totally agreed. Personally I do not know about this path style (and never used) before I discovered bysybox-w32