blob: b6d6eb4aa794cf3e5d821152d2c4064096c626f4 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001srcdir = @srcdir@
2top_srcdir = @top_srcdir@
3VPATH = @srcdir@
4top_builddir = .
5my_dir = .
6INSTALL = @INSTALL@
7
8@MCONFIG@
9
10% : %.sh
11
12@RESIZER_CMT@RESIZE_DIR= resize
13@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
14@UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
15@BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
16QUOTA_LIB_SUBDIR= lib/quota
17
18LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl
19PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
20SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
21
22SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
23 lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
24
25TAR=tar
26
27all:: subs
28 $(MAKE) libs
29 $(MAKE) progs
30
31subs: $(DEP_SUBSTITUTE)
32 @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
33 then $(MAKE) $$i || exit $$? ; fi ; done
34 @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
35 @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
36
37progs: all-progs-recursive
38libs: all-libs-recursive
39all-progs-recursive all-libs-recursive: subs
40
41e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
42 cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
43
44rpm: e2fsprogs.spec
45 sh contrib/build-rpm
46
47docs:
48
49install-doc-libs:
50
51uninstall-doc-libs:
52
53clean-doc:
54
55distclean-doc:
56
57install: subs all-libs-recursive install-progs-recursive \
58 install-shlibs-libs-recursive install-doc-libs
59 if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
60
61install-strip: subs all-libs-recursive install-strip-progs-recursive \
62 install-shlibs-strip-libs-recursive install-doc-libs
63
64uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
65
66install-libs: install-libs-recursive
67
68uninstall-libs: uninstall-libs-recursive
69
70check-recursive: all
71
72TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
73 mostlyclean-recursive realclean-recursive:
74 @for subdir in $(SUBDIRS); do \
75 if test -d $$subdir ; then \
76 target=`echo $@|$(SED) 's/-recursive//'`; \
77 echo making $$target in $$subdir; \
78 (cd $$subdir && $(MAKE) $$target) || exit 1; \
79 fi ; \
80 done
81
82all-progs-recursive install-progs-recursive install-strip-progs-recursive \
83 uninstall-progs-recursive: all-libs-recursive
84 @for subdir in $(PROG_SUBDIRS); do \
85 if test -d $$subdir ; then \
86 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
87 echo making $$target in $$subdir; \
88 (cd $$subdir && $(MAKE) $$target) || exit 1; \
89 fi ; \
90 done
91
92all-libs-recursive install-libs-recursive install-strip-libs-recursive \
93 uninstall-libs-recursive install-shlibs-libs-recursive \
94 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
95 @for subdir in $(LIB_SUBDIRS); do \
96 if test -d $$subdir ; then \
97 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
98 echo making $$target in $$subdir; \
99 (cd $$subdir && $(MAKE) $$target) || exit 1; \
100 fi ; \
101 done
102
103mostlyclean: mostlyclean-recursive mostlyclean-local
104
105clean: clean-recursive clean-local clean-doc
106 $(RM) -f $(SUBS)
107
108distclean: distclean-doc distclean-recursive
109 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
110 $(MAKE) distclean-local
111
112realclean: realclean-recursive realclean-local
113
114depend:: depend-recursive
115
116lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
117 $(srcdir)/lib/ext2fs/ext2_types.h.in
118 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
119
120lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
121 $(srcdir)/lib/blkid/blkid_types.h.in
122 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
123
124lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
125 $(srcdir)/lib/uuid/uuid_types.h.in
126 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
127
128mostlyclean-local:
129 $(RM) -f \#* *~ *.orig core MAKELOG
130
131clean-local: mostlyclean-local
132
133distclean-local: clean-local
134 $(RM) -f $(SUBS) $(SUBST_CONF) \
135 config.status config.log config.cache MCONFIG Makefile \
136 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
137
138realclean-local: distclean-local
139 $(RM) -f configure
140
141check:: all check-recursive
142