@@ -197,7 +197,7 @@ module fpm_model
197
197
198
198
contains
199
199
200
- recursive function info_build_target (t ) result(s)
200
+ function info_build_target (t ) result(s)
201
201
type (build_target_t), intent (in ) :: t
202
202
character (:), allocatable :: s
203
203
integer :: i
@@ -215,10 +215,7 @@ recursive function info_build_target(t) result(s)
215
215
s = s // " , dependencies=["
216
216
if (allocated (t% dependencies)) then
217
217
do i = 1 , size (t% dependencies)
218
- ! TODO: This compiles, but it hangs at runtime due to infinite
219
- ! recursion, so for now we just print "..."
220
- ! s = s // info_build_target(t%dependencies(i)%ptr)
221
- s = s // " build_target_t(...)"
218
+ s = s // info_build_target_short(t% dependencies(i)% ptr)
222
219
if (i < size (t% dependencies)) s = s // " , "
223
220
end do
224
221
end if
@@ -273,6 +270,16 @@ recursive function info_build_target(t) result(s)
273
270
s = s // " )"
274
271
end function
275
272
273
+ function info_build_target_short (t ) result(s)
274
+ ! Prints a shortened representation of build_target_t
275
+ type (build_target_t), intent (in ) :: t
276
+ character (:), allocatable :: s
277
+ integer :: i
278
+ s = " build_target_t("
279
+ s = s // ' output_file="' // t% output_file // ' "'
280
+ s = s // " , ...)"
281
+ end function
282
+
276
283
function info_srcfile (source ) result(s)
277
284
type (srcfile_t), intent (in ) :: source
278
285
character (:), allocatable :: s
0 commit comments