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