Put this Makefile into your home directory (the ~directory):
objdir := ~/foo/obj
imagedir := ~/foo/images
.PHONY: all
all: $(imagedir)/foobar.out
$(objdir) $(imagedir):
@mkdir -p $@
$(objdir)/foo.obj : Makefile | $(objdir)
cp $< $@
$(imagedir)/%bar.out: $(objdir)/%.obj | $(imagedir)
cp $< $@
Cd to the ~ directory and run make. You will get an error about no rule to make
the foobar.out file.
Edit the makefile so objdir does not contain the "~/". Run make on this version
and it will build correctly.
Somehow absolute paths in pattern rules are treated specially.
I want to work in absolute paths only so using relative paths is not an option
for me.
For the record this is both with the Cygwin version of gnu make and with make
3.80 on Linux.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make