blob: 45f297220a8a37e10082253adcdfbb39933328f1 [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
Theodore Ts'ocdf186e2001-06-13 22:16:47 +000016
Scott James Remnant39fd3d42009-05-14 13:03:25 +010017LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) intl
Theodore Ts'o921f4ad2004-11-19 17:25:27 -050018PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
Theodore Ts'of3b3dbb1999-07-19 16:18:52 +000019SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
Theodore Ts'o50e1e101997-04-26 13:58:21 +000020
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050021SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
Theodore Ts'o50e1e101997-04-26 13:58:21 +000022
Theodore Ts'o21c84b71997-04-29 16:15:03 +000023TAR=tar
24
Theodore Ts'o78130a22003-03-14 02:42:42 -050025all:: subs
Theodore Ts'o6928adc2000-05-25 23:28:50 +000026 $(MAKE) libs
27 $(MAKE) progs
28 $(MAKE) docs
Theodore Ts'oa4d09611997-04-29 14:28:00 +000029
Theodore Ts'of0eae152008-10-10 14:00:46 -040030subs: $(DEP_SUBSTITUTE)
Theodore Ts'o60b30db2008-09-01 17:59:01 -040031 @for i in $(SUBS) ; do if test -d `dirname $$i` ; \
32 then $(MAKE) $$i || exit $$? ; fi ; done
33 @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi)
34 @(if test -d lib/ext2fs ; then cd lib/ext2fs && $(MAKE) ext2_err.h; fi)
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050035
36progs: subs all-progs-recursive
37libs: subs all-libs-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +000038
Andreas Dilger54833572007-05-22 16:20:14 -040039e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
40 cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status
41
42rpm: e2fsprogs.spec
Andreas Dilger90466c12006-06-21 00:05:49 -040043 sh contrib/build-rpm
44
Theodore Ts'o21c84b71997-04-29 16:15:03 +000045docs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050046 -@test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o21c84b71997-04-29 16:15:03 +000047
48install-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050049 -@test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o21c84b71997-04-29 16:15:03 +000050
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000051uninstall-doc-libs:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050052 -@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000053
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000054clean-doc:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050055 -@test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000056
57distclean-doc:
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050058 -test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +000059
Theodore Ts'o94ba8c72003-03-02 02:07:14 -050060install: subs all-libs-recursive install-progs-recursive \
Theodore Ts'o522798d2004-12-15 11:28:55 -050061 install-shlibs-libs-recursive install-doc-libs
Theodore Ts'o56eb4d42004-09-17 19:54:22 -040062 if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +000063
Theodore Ts'o522798d2004-12-15 11:28:55 -050064install-strip: subs all-libs-recursive install-strip-progs-recursive \
65 install-shlibs-strip-libs-recursive install-doc-libs
66
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000067uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
68
Theodore Ts'o50e1e101997-04-26 13:58:21 +000069install-libs: install-libs-recursive
70
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000071uninstall-libs: uninstall-libs-recursive
72
Theodore Ts'o3e377db2000-12-09 02:37:33 +000073TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
Theodore Ts'o522798d2004-12-15 11:28:55 -050074 mostlyclean-recursive realclean-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050075 @for subdir in $(SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000076 if test -d $$subdir ; then \
77 target=`echo $@|$(SED) 's/-recursive//'`; \
78 echo making $$target in $$subdir; \
79 (cd $$subdir && $(MAKE) $$target) || exit 1; \
80 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000081 done
82
Theodore Ts'o522798d2004-12-15 11:28:55 -050083all-progs-recursive install-progs-recursive install-strip-progs-recursive \
Mike Frysinger1f803992008-02-28 20:41:17 -050084 uninstall-progs-recursive: all-libs-recursive
Theodore Ts'o47204ff2004-11-30 10:52:27 -050085 @for subdir in $(PROG_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000086 if test -d $$subdir ; then \
87 target=`echo $@|$(SED) 's/-progs-recursive//'`; \
88 echo making $$target in $$subdir; \
89 (cd $$subdir && $(MAKE) $$target) || exit 1; \
90 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000091 done
92
Theodore Ts'o522798d2004-12-15 11:28:55 -050093all-libs-recursive install-libs-recursive install-strip-libs-recursive \
94 uninstall-libs-recursive install-shlibs-libs-recursive \
95 install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
Theodore Ts'o47204ff2004-11-30 10:52:27 -050096 @for subdir in $(LIB_SUBDIRS); do \
Theodore Ts'o24b2c7a1997-06-07 20:42:58 +000097 if test -d $$subdir ; then \
98 target=`echo $@|$(SED) 's/-libs-recursive//'`; \
99 echo making $$target in $$subdir; \
100 (cd $$subdir && $(MAKE) $$target) || exit 1; \
101 fi ; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000102 done
103
104mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000105
Theodore Ts'o3ac9f0e1999-07-19 21:02:11 +0000106clean: clean-recursive clean-local clean-doc
Theodore Ts'o605e6f02004-11-30 22:06:27 -0500107 $(RM) -f $(SUBS)
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000108
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500109distclean: distclean-doc distclean-recursive
Theodore Ts'o605e6f02004-11-30 22:06:27 -0500110 $(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
Theodore Ts'o9c3ea642008-01-01 17:00:39 -0500111 $(MAKE) distclean-local
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000112
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000113realclean: realclean-recursive realclean-local
114
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000115depend:: depend-recursive
116
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400117lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
118 $(srcdir)/lib/ext2fs/ext2_types.h.in
119 cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000120
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400121lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
122 $(srcdir)/lib/blkid/blkid_types.h.in
123 cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
Theodore Ts'oed1b33e2003-03-01 19:29:01 -0500124
Theodore Ts'o4ea7ea02006-04-09 08:41:55 -0400125lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
126 $(srcdir)/lib/uuid/uuid_types.h.in
127 cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500128
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000129mostlyclean-local:
Andreas Dilger83d0b972001-08-04 01:02:34 -0600130 $(RM) -f \#* *~ *.orig core MAKELOG
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000131
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000132clean-local: mostlyclean-local
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000133
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000134distclean-local: clean-local
Andreas Dilger83d0b972001-08-04 01:02:34 -0600135 $(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +0000136 config.status config.log config.cache MCONFIG Makefile \
137 $(srcdir)/TAGS $(srcdir)/Makefile.in.old
138
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000139realclean-local: distclean-local
140 $(RM) -f configure
141
Theodore Ts'o94ba8c72003-03-02 02:07:14 -0500142check:: subs check-recursive
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000143