[PATCH 24/31] Improve the portability of mesh/Makefile.

* mesh/Makefile.am (meshes): Add `$(srcdir)/' prefixes in front of all file names. (pinv_curv, max_curv): Use substitutions references on $(meshes) instead of (non portable) string substitution (GNU Make's `patsubst' function). Remove dead code. --- milena/ChangeLog | 11 +++++++++++ milena/mesh/Makefile.am | 22 ++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 69ab563..40b184b 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,16 @@ 2009-05-14 Roland Levillain <roland@lrde.epita.fr> + Improve the portability of mesh/Makefile. + + * mesh/Makefile.am (meshes): Add `$(srcdir)/' prefixes in front of + all file names. + (pinv_curv, max_curv): Use substitutions references on $(meshes) + instead of (non portable) string substitution (GNU Make's + `patsubst' function). + Remove dead code. + +2009-05-14 Roland Levillain <roland@lrde.epita.fr> + Prevent the regeneration of computed meshes. * mesh/Makefile.am ($(srcdir)/%-pinv-curv.off) diff --git a/milena/mesh/Makefile.am b/milena/mesh/Makefile.am index 679e55a..65282c9 100644 --- a/milena/mesh/Makefile.am +++ b/milena/mesh/Makefile.am @@ -11,13 +11,17 @@ dist_mesh_DATA = ## Meshes. ## ## -------- ## +# The `$(srcdir)/' prefixes are mandatory, to force `$(pinv_curv)' and +# `$(max_curv)' to reference files living in the *source* directory, +# instead of the current (build) directory. See their definitions +# below, using substitution references on `$(meshes)'. meshes = \ - bunny-holefilled.off \ - cone.off \ - cube.off \ - socket.off \ - teapot.off \ - tetrahedron.off + $(srcdir)/bunny-holefilled.off \ + $(srcdir)/cone.off \ + $(srcdir)/cube.off \ + $(srcdir)/socket.off \ + $(srcdir)/teapot.off \ + $(srcdir)/tetrahedron.off dist_mesh_DATA += $(meshes) ## ------------------------------------ ## @@ -35,8 +39,7 @@ mesh_pinv_curv: $(top_srcdir)/milena/apps/statues/mesh-pinv-curv.cc ## $(srcdir)/%-pinv-curv.off: %.off $(mesh_pinv_curv) ## $(mesh_pinv_curv) $< $@ -# pinv_curv = $(meshes:.off=-pinv-curv.off) -pinv_curv = $(patsubst %.off,$(srcdir)/%-pinv-curv.off,$(meshes)) +pinv_curv = $(meshes:.off=-pinv-curv.off) dist_mesh_DATA += $(pinv_curv) ## ----------------------------- ## @@ -54,8 +57,7 @@ mesh_max_curv: $(top_srcdir)/milena/apps/statues/mesh-max-curv.cc ## $(srcdir)/%-max-curv.off: %.off $(mesh_max_curv) ## $(mesh_max_curv) $< $@ -#max_curv = $(meshes:.off=-max-curv.off) -max_curv = $(patsubst %.off,$(srcdir)/%-max-curv.off,$(meshes)) +max_curv = $(meshes:.off=-max-curv.off) dist_mesh_DATA += $(max_curv) .PHONY: debug -- 1.6.1.2
participants (1)
-
Roland Levillain