+if USE_QUILT
+ ln -s ../$(patches) linux-stage/patches
+ ln -s ../$(series) linux-stage/series
+ cd linux-stage && quilt push -a -q
+else
+ @echo -n "Applying ext4 patches:"
+ @cd linux-stage && for i in $$(<../$(series)) ; do \
+ echo -n " $$i" ; \
+ patch -s -p1 < ../$(patches)/$$i || exit 1 ; \
+ done
+ @echo
+endif
+ mkdir -p linux trace/events
+ @echo -n "Replacing 'ext4' with 'ldiskfs':"
+ for i in $(notdir $(backfs_headers) $(backfs_sources)) $(new_sources) ; do \
+ echo -n " $$i" ; \
+ sed $(strip $(ldiskfs_sed_flags)) \
+ linux-stage/fs/ext4/$$i > $$i ; \
+ done
+ for i in $(subst ext4,,$(notdir $(backfs_headers))) ; do \
+ if test -f "ext4$$i" ; then \
+ echo -n " ext4$$i" ; \
+ mv ext4$$i ldiskfs$$i ; \
+ fi ; \
+ done
+ for i in $(subst ext4,,$(notdir $(linux_headers) $(new_headers))) ; do \
+ echo -n " ext4$$i" ; \
+ sed $(strip $(ldiskfs_sed_flags)) \
+ linux-stage/include/linux/ext4$$i \
+ > linux/ldiskfs$$i ; \
+ done
+ for i in $(subst ext4,,$(notdir $(trace_headers))) ; do \
+ echo -n " ext4$$i"; \
+ sed $(strip $(ldiskfs_sed_flags)) \
+ linux-stage/include/trace/events/ext4$$i \
+ > trace/events/ldiskfs$$i ; \
+ done
+ for i in $(notdir $(linux_new_headers)) ; do \
+ echo -n " $$i"; \
+ sed $(strip $(ldiskfs_sed_flags)) \
+ linux-stage/include/linux/$$i \
+ > linux/$$i ; \
+ done
+
+ @echo
+ touch sources
+
+foo-check:
+ @echo "ldiskfs_sources: $(ldiskfs_sources)"
+ @echo "ldiskfs_SOURCES: $(ldiskfs_SOURCES)"
+ @echo "ldiskfs_headers: $(ldiskfs_headers)"
+ @echo "ldiskfs_objects: $(ldiskfs_objects)"
+ @echo "ldiskfs_OBJECTS: $(ldiskfs_OBJECTS)"
+ @echo "ldiskfs_LDADD: $(ldiskfs_LDADD)"
+
+MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
+CLEANFILES = sources $(notdir $(linux_new_headers) $(linux_headers) $(backfs_headers) $(backfs_sources) $(new_sources) $(new_headers) $(trace_headers))
+
+clean-local:
+ rm -rf linux linux-stage ldiskfs*.h trace modules.order