chiark / gitweb /
subdirmk/regen.mk.in: Trim `$(srcdir)/' prefix from output makefile names
authorMark Wooding <mdw@distorted.org.uk>
Wed, 13 Nov 2019 19:00:23 +0000 (19:00 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 13 Nov 2019 19:29:57 +0000 (19:29 +0000)
This doesn't make a difference if you're doing in-tree builds, of course.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
subdirmk/regen.mk.in

index 65d75c2..948ef4e 100644 (file)
@@ -38,9 +38,9 @@ main.mk $(MAKEFILES): .makefiles.stamp ;
                $(filter-out Subdir.sd.mk %/Subdir.sd.mk        \
                             %.mk.in                            \
                        , $?),,                                 \
-               $(sort                                          \
+               $(patsubst $(top_srcdir)/%,%, $(sort            \
                        $(patsubst %.sd.mk,%.mk,$(filter %.sd.mk,$?)) \
-                       $(patsubst %.mk.in,%.mk,$(filter %.mk.in,$?))))
+                       $(patsubst %.mk.in,%.mk,$(filter %.mk.in,$?)))))
        touch $@
 
 realclean:: clean