blob: b951c0174cc3d3f15c3d7803cba8a0fc5a80ebd2 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001srcdir = @srcdir@
2top_srcdir = @top_srcdir@
3VPATH = @srcdir@
4top_builddir = .
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00005my_dir = .
Theodore Ts'o50e1e101997-04-26 13:58:21 +00006INSTALL = @INSTALL@
7
8@MCONFIG@
9
Theodore Ts'o24c9b552008-07-14 22:38:01 -040010% : %.sh
11
Theodore Ts'ocdf186e2001-06-13 22:16:47 +000012@RESIZER_CMT@RESIZE_DIR= resize
13@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
Scott James Remnant39fd3d42009-05-14 13:03:25 +010014@UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
Theodore Ts'o14b596d2009-04-22 09:18:30 -040015@BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
Darrick J. Wong5ce368f2018-03-23 18:57:09 -070016@E2SCRUB_CMT@E2SCRUB_DIR= scrub
Theodore Ts'o0afb9be2018-08-18 11:19:25 -040017@ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support
18@ALL_CMT@E2P_LIB_SUBDIR= lib/e2p
19@ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs
Theodore Ts'ocdf186e2001-06-13 22:16:47 +000020
Theodore Ts'o0afb9be2018-08-18 11:19:25 -040021LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \
22 $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) intl
23
Theodore Ts'o6ac81e42018-08-18 23:22:53 -040024PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
25 $(E2SCRUB_DIR)
26
Theodore Ts'of3b3dbb1999-07-19 16:18:52 +000027SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
Theodore Ts'o50e1e101997-04-26 13:58:21 +000028
Theodore Ts'o0355d6d2016-01-01 21:44:12 -050029SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \
Theodore Ts'od1154eb2011-09-18 17:34:37 -040030 lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
Theodore Ts'o50e1e101997-04-26 13:58:21 +000031
Theodore Ts'o21c84b71997-04-29 16:15:03 +000032TAR=tar
33
Theodore Ts'o78130a22003-03-14 02:42:42 -050034all:: subs
Theodore Ts'o6928adc2000-05-25 23:28:50 +000035 $(MAKE) libs
Theodore Ts'o0afb9be2018-08-18 11:19:25 -040036@ALL_CMT@ $(MAKE) progs
37@ALL_CMT@ $(MAKE) docs
Theodore Ts'oa4d09611997-04-29 14:28:00 +000038
Theodore Ts'of0eae152008-10-10 14:00:46 -040039subs: $(DEP_SUBSTITUTE)
Theodore Ts'o60b30db2008-09-01 17:59:01 -040040 @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
41 then $(MAKE) $$i || exit $$? ; fi ; done
42 @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
43 @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
Theodore Ts'odcb8e1f2016-03-06 20:37:49 -050044 @(if test -d lib/support ; then cd lib/support && $(MAKE) prof_err.h; fi)
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050045
Theodore Ts'o3a0d5d32010-05-17 23:48:52 -040046progs: all-progs-recursive
47libs: all-libs-recursive
Theodore Ts'oed07fd92018-08-22 13:42:23 -040048all-progs-recursive all-libs-recursive:: subs
Theodore Ts'o50e1e101997-04-26 13:58:21 +000049
Theodore Ts'oe5f0f3e2018-08-18 10:42:44 -040050rpm:
Andreas Dilger90466c12006-06-21 00:05:49 -040051 sh contrib/build-rpm
52
Theodore Ts'o21c84b71997-04-29 16:15:03 +000053docs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050054 -@test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000055
56install-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050057 -@test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o21c84b71997-04-29 16:15:03 +000058
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000059uninstall-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050060 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000061
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000062clean-doc:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050063 -@test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000064
65distclean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050066 -test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000067
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050068install: subs all-libs-recursive install-progs-recursive \
Theodore Ts'o522798d2004-12-15 11:28:55 -050069 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'ofeb235e2018-08-24 17:12:20 -040070@SUBSET_CMT@ $(MAKE) install-libs
Theodore Ts'o50e1e101997-04-26 13:58:21 +000071
Theodore Ts'o522798d2004-12-15 11:28:55 -050072install-strip: subs all-libs-recursive install-strip-progs-recursive \
73 install-shlibs-strip-libs-recursive install-doc-libs
74
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000075uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
76
Theodore Ts'o50e1e101997-04-26 13:58:21 +000077install-libs: install-libs-recursive
78
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000079uninstall-libs: uninstall-libs-recursive
80
Theodore Ts'ofedfb272014-02-23 00:17:09 -050081coverage.txt: coverage.txt-recursive
82
Matthias Andree58b3d8d2012-05-11 19:14:30 -040083check-recursive: all
84
Theodore Ts'o11b8ef82017-04-26 10:07:18 -040085TAGS clean-recursive distclean-recursive depend-recursive fullcheck-recursive \
86 check-recursive mostlyclean-recursive realclean-recursive \
87 coverage.txt-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050088 @for subdir in $(SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000089 if test -d $$subdir ; then \
90 target=`echo $@|$(SED) 's/-recursive//'`; \
91 echo making $$target in $$subdir; \
92 (cd $$subdir && $(MAKE) $$target) || exit 1; \
93 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000094 done
95
Theodore Ts'o522798d2004-12-15 11:28:55 -050096all-progs-recursive install-progs-recursive install-strip-progs-recursive \
Theodore Ts'oed07fd92018-08-22 13:42:23 -040097 uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive
98
99
100@ALL_CMT@all-progs-recursive install-progs-recursive install-strip-progs-recursive \
101@ALL_CMT@ uninstall-progs-recursive coverage.txt-progs-recursive:: all-libs-recursive
102@ALL_CMT@ @for subdir in $(PROG_SUBDIRS); do \
103@ALL_CMT@ if test -d $$subdir ; then \
104@ALL_CMT@ target=`echo $@|$(SED) 's/-progs-recursive//'`; \
105@ALL_CMT@ echo making $$target in $$subdir; \
106@ALL_CMT@ (cd $$subdir && $(MAKE) $$target) || exit 1; \
107@ALL_CMT@ fi ; \
108@ALL_CMT@ done
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000109
Theodore Ts'o522798d2004-12-15 11:28:55 -0500110all-libs-recursive install-libs-recursive install-strip-libs-recursive \
111 uninstall-libs-recursive install-shlibs-libs-recursive \
Theodore Ts'ofedfb272014-02-23 00:17:09 -0500112 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive \
Theodore Ts'oed07fd92018-08-22 13:42:23 -0400113 coverage.txt-libs-recursive::
Theodore Ts'o47204ff2004-11-30 10:52:27 -0500114 @for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +0000115 if test -d $$subdir ; then \
116 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
117 echo making $$target in $$subdir; \
118 (cd $$subdir && $(MAKE) $$target) || exit 1; \
119 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000120 done
121
122mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000123
Theodore Ts'ofedfb272014-02-23 00:17:09 -0500124clean:: clean-recursive clean-local clean-doc
Theodore Ts'o605e6f02004-11-30 22:06:27 -0500125 $(RM) -f $(SUBS)
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000126
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500127distclean: distclean-doc distclean-recursive
Theodore Ts'oe5f0f3e2018-08-18 10:42:44 -0400128 $(RM) -rf autom4te.cache ext2ed/Makefile po/stamp-po \
Theodore Ts'o59a220d2015-07-01 19:40:23 -0400129 asm_types.h config.log public_config.h parse-types.log
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500130 $(MAKE) distclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000131
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000132realclean: realclean-recursive realclean-local
133
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000134depend:: depend-recursive
135
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400136lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
137 $(srcdir)/lib/ext2fs/ext2_types.h.in
138 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000139
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400140lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
141 $(srcdir)/lib/blkid/blkid_types.h.in
142 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500143
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400144lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
145 $(srcdir)/lib/uuid/uuid_types.h.in
146 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500147
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000148mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600149 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000150
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000151clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000152
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000153distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600154 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000155 config.status config.log config.cache MCONFIG Makefile \
156 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
157
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000158realclean-local: distclean-local
159 $(RM) -f configure
160
Andreas Dilgerdb7cb4b2011-06-15 22:17:38 -0400161check:: all check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000162
Theodore Ts'o11b8ef82017-04-26 10:07:18 -0400163fullcheck:: all fullcheck-recursive