3 modulefs_DATA = ldiskfs$(KMODEXT)
7 ldiskfs_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs,$(notdir $(linux_headers))))
9 $(filter %.c,$(ldiskfs_patched_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_patched_sources))
12 -e "s/dx_hash_info/ext3_dx_hash_info/g" \
13 -e "s/dir_private_info/ext3_dir_private_info/g" \
14 -e "s/DX_HASH/EXT3_DX_HASH/g" \
15 -e "s/reserve_window/ext3_reserve_window/g" \
16 -e "s/rsv_window_add/ext3_rsv_window_add/g" \
17 -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
19 %.c: linux-stage/fs/ext3/%.c
20 sed $(strip $(ldiskfs_sed_flags)) $< > $@
22 %.h: linux-stage/fs/ext3/%.h
23 sed $(strip $(ldiskfs_sed_flags)) $< > $@
25 linux/ldiskfs%.h: linux-stage/include/linux/ext3%.h
26 sed $(strip $(ldiskfs_sed_flags)) $< > $@
29 # FIXME: we need to grab the series in configure somehow
32 series := @top_srcdir@/lustre/kernel_patches/series/ldiskfs-$(LDISKFS_SERIES)
33 patches := @top_srcdir@/lustre/kernel_patches/patches
35 sources: $(ext3_sources) $(ext3_headers) $(linux_headers) $(series)
36 rm -rf linux-stage linux sources $(ldiskfs_SOURCES)
37 mkdir -p linux-stage/fs/ext3 linux-stage/include/linux
38 cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3
39 cp $(linux_headers) linux-stage/include/linux
41 ln -s ../$(patches) linux-stage/patches
42 ln -s ../$(series) linux-stage/series
43 cd linux-stage && quilt push -a -q
45 @echo -n "Applying ext3 patches:"
46 @cd linux-stage && for i in $$(<../$(series)) ; do \
48 patch -s -p1 < ../$(patches)/$$i || exit 1 ; \
53 @echo -n "Replacing 'ext3' with 'ldiskfs':"
54 @for i in $(notdir $(ext3_headers) $(ext3_sources)) $(new_sources) ; do \
56 sed $(strip $(ldiskfs_sed_flags)) \
57 linux-stage/fs/ext3/$$i > $$i ; \
59 @for i in $(subst ext3,,$(notdir $(linux_headers) $(new_headers))) ; do \
60 echo -n " ext3$$i" ; \
61 sed $(strip $(ldiskfs_sed_flags)) \
62 linux-stage/include/linux/ext3$$i \
63 > linux/ldiskfs$$i ; \
69 @echo "ldiskfs_sources: $(ldiskfs_sources)"
70 @echo "ldiskfs_SOURCES: $(ldiskfs_SOURCES)"
71 @echo "ldiskfs_headers: $(ldiskfs_headers)"
72 @echo "ldiskfs_objects: $(ldiskfs_objects)"
73 @echo "ldiskfs_OBJECTS: $(ldiskfs_OBJECTS)"
74 @echo "ldiskfs_LDADD: $(ldiskfs_LDADD)"
76 MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
77 CLEANFILES = sources $(notdir $(linux_headers) $(ext3_headers) $(ext3_sources) $(new_sources) $(new_headers))
80 rm -rf linux linux-stage