On Wed, 10 Mar 2010, liang cheng wrote:
> I wrote a used-defined input script and put it as
> .../libmesh/examples/lc2d_v1/lc2d_v1.C, copied a Makefile within the same
> folder with slight modification of ex11's (only change the ' target
> := ./lc2d_v1-$(METHOD)' ). Make it, then get this error:
>
>>> li...@b356:~/Desktop/libmesh/examples/lc2d_v1$ make
>>> make: *** No rule to make target `../..2d_v1.C', needed by
> `lc2d_v1.x86_64-unknown-linux-gnu.dbg.o'. Stop.
>>> li...@b356:~/Desktop/libmesh/examples/lc2d_v1$
>
> if I put both lc2d_v1.C and Makefile in any example/ex(xx) folder, that
> works, did I miss something in the Makefile if writing a script outside the
> ex(xx) folder? Thanks for any help!
Sorry, this is my fault - it's the combination of a bug which I wrote long
ago and a non-buggy change the day before yesterday which exposed it.
Unfortunately, while I fixed the bug in the example Makefiles, there's
no way for us to centrally fix it in Makefiles that people have copied/modified
from the example Makefiles.
Change the lines:
.depend:
@$(perl) $(LIBMESH_DIR)/contrib/bin/make_dependencies.pl -I. $(foreach
i, $(wildcard $(LIBMESH_DIR)/include/*), -I$(i)) "-S\$$(obj-suffix)"
$(srcfiles) > .depend
@$(perl) -pi -e 's# $(LIBMESH_DIR)# \$$\(LIBMESH_DIR\)#' .depend
@echo "Updated .depend"
to just:
.depend:
@$(perl) $(LIBMESH_DIR)/contrib/bin/make_dependencies.pl -I. $(foreach
i, $(wildcard $(LIBMESH_DIR)/include/*), -I$(i)) "-S\$$(obj-suffix)"
$(srcfiles) > .depend
The echo is annoying now that we rebuild .depend on every make, and the perl
regexp is buggy for anyone who has special characters (including .) in their
$LIBMESH_DIR or who just doesn't have LIBMESH_DIR set.
---
Roy
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users