1 # Copyright (C) 2001 Cluster File Systems, Inc.
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
11 EXTNP = htree-ext3-2.4.18.diff ext3-ino_sb-macro.diff
12 EXTNC = balloc.c bitmap.c dir.c file.c fsync.c ialloc.c inode.c ioctl.c
13 EXTNC+= namei.c super.c symlink.c
14 EXTNI = extN_fs.h extN_fs_i.h extN_fs_sb.h extN_jbd.h
15 extN_SOURCES = $(EXTNC) $(EXTNI) page.c # punch.c
17 DISTCLEANFILES = $(EXTNC) $(EXTNI) patch-stamp *.orig *.rej
18 SUB=-e "s/ext3/extN/g" -e "s/EXT3/EXTN/g"
20 include $(top_srcdir)/Rules
23 test -e page.c || ln -sf $(top_srcdir)/lib/page.c
25 # Patch the kernel files with our ext3 patches. We need to go through some
26 # extra hoops because the include files are in a different tree and because
27 # patch likes to make local copies of files with (sym)links when it is patching
28 # them. To avoid this, we copy/patch in the source dir instead of the build
29 # dir (if they are different).
30 $(EXTNC) $(EXTNI): patch-stamp
32 test -e $(top_srcdir)/fs || ln -sf . $(top_srcdir)/fs
34 list='$(EXTNC)'; for f in $$list; do \
35 sed $(SUB) $(LINUX)/fs/ext3/$$f > $(top_srcdir)/fs/extN/$$f; \
38 list='$(EXTNI)'; for i in $$list; do \
39 s=`echo $$i | sed "s/extN/ext3/"`; \
40 sed $(SUB) $(LINUX)/include/linux/$$s > \
41 $(top_srcdir)/include/linux/$$i; \
44 list='$(EXTNP)'; for p in $$list; do \
45 sed $(SUB) $(srcdir)/$$p | (cd $(top_srcdir); patch -p1); \
47 (cd $(top_srcdir); patch -p1) < $(srcdir)/extN-ino_sb-fixup.diff
48 echo timestamp > patch-stamp
50 # Don't distribute any patched files.
52 rm -f $(top_srcdir)/fs
53 list='$(EXTNC)'; for f in $$list; do rm -f $(distdir)/$$f; done
54 list='$(EXTNI)'; for i in $$list; do \
55 rm -f $(distdir)/../include/linux/$$i; \