NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/50176: make(1) prerequisite not assigned to target if



Martin Husemann <martin%duskware.de@localhost> wrote:
 | Can you please provide a simple makefile (using cat/echo/touch or
 | similar basic tools) to demonstrate the issue?
 | 
 | I can not see from your original report why the compiler is not seeing
 | mime_types.h and which files are actually there/where (and especially
 | in what work dir this happens and where the source lives).

Yes sure.  Sorry, my old box was compromised (at least via
Firefox, stupid me) and i had to rotate keys+ and move to a new
box, the first in over six years, am still not fully setup etc.

--steffen

mkdir x || exit 1
cd x || exit 2
echo '#include "hf.h"' > cf.c
cat > exp.mk <<'_EOT'
OBJ_SRC = ./cf.c
OBJ = $(OBJ_SRC:.c=.o)
.SUFFIXES: .o .c .y
.c.o:
	$(CC) $(CFLAGS) $(INCS) -c $(<)
.c .y: ;
all: $(OBJ)
cf.o: hf.h
hf.h:
	echo '#include <stdlib.h>' > hf.h
clean:
	rm -f $(OBJ) hf.h
_EOT
< exp.mk sed -e 1d | (echo OBJ_SRC = cf.c; cat) > imp.mk
echo explicit relative CWD
make -f exp.mk
make -f exp.mk clean
echo implicit relative CWD
make -f imp.mk
make -f imp.mk clean
cd ..
rm -rf x || exit 3



Home | Main Index | Thread Index | Old Index