~autumnull/haredo

2 2

parent dir default.do arguments

Details
Message ID
<CRDWDZN9P33W.343K2JERGVA7Q@bookchin>
DKIM signature
missing
Download raw message
First: Hi, thanks for making haredo!

I'm trying out haredo, migrating a Makefile project to haredo and I may
have encountered a bug while replicating the segregated build/ layout.

https://git.sr.ht/~roselandgoose/kyu

Context:
I like being able to have the 'clean' task and .gitignore be as simple as
`rm -r build/`, so I have my Makefiles live next to their source files
but targetting build/$file.c.o for example.

Problem:
I have a default.do file that is called for a build/$file.o target, but
isn't passed the correct target path.

Am I doing something wrong? A cursory skim over src/main.ha didn't
trigger any red-flags for me, but if you also suspect this to be a bug
then I'd love to try and find+patch it!
 
Setup:
(There no spaces in any absolute paths)
```
kyulib.c:
│ /*
│   ...
│ */
└ 

all.do:
│ source target/toolchain.sh
│ 
│ _OBJS=kyulib.c.o
│ 
│ OBJS=$(for obj in ${_OBJS}; do
│     echo "build/${obj}"
│ done)
│ 
│ mkdir -p build
│ haredo $OBJS || true
└ 

default.c.o.do:
│ source target/toolchain.sh
│ 
│ echo 1: $1
│ echo 2: $2
│ echo 3: $3
│ 
│ # ${CC} -o ${3} -c "${2}"
└ 
```

Output:
```
haredo all
haredo   build/kyulib.c.o
1: build/build/.c.o
2: build/build/
3: /tmp/d12f215aa481f85c/16a46a7e877641dc8d320831c8ba31ce
haredo     build/build/ (no dofile)
aarch64-none-elf-gcc: warning: build/build/: linker input file unused because linking not done
aarch64-none-elf-gcc: error: build/build/: linker input file not found: No such file or directory
haredo   build/kyulib.c.o (error: exited with status 1)
haredo all (child failed)
```

Cheers,
Rosie Keith Languet
Details
Message ID
<CRDX8P0TBYQ4.2EHAUYBX7VO93@bookchin>
In-Reply-To
<CRDWDZN9P33W.343K2JERGVA7Q@bookchin> (view parent)
DKIM signature
missing
Download raw message
I spoke too soon here:
> A cursory skim over src/main.ha didn't trigger any red-flags for me, 
> but if you also suspect this to be a bug then I'd love to try and 
> find+patch it!

I think I found it!

src/main.ha:415 Is reading and writing from targetbuf at the same time.

Patch in progress...
-RKL
Details
Message ID
<2637f68a-23d8-2a03-a5d7-7d0d05f2eb49@posteo.net>
In-Reply-To
<CRDX8P0TBYQ4.2EHAUYBX7VO93@bookchin> (view parent)
DKIM signature
missing
Download raw message
Ah yeah! That sure looks like a bug to me :) Good catch!

~Autumn
Reply to thread Export thread (mbox)