1#
2# Standard e2fsprogs prologue....
3#
4
5srcdir = @srcdir@
6top_srcdir = @top_srcdir@
7VPATH = @srcdir@
8top_builddir = ..
9my_dir = misc
10INSTALL = @INSTALL@
11
12@MCONFIG@
13
14@IMAGER_CMT@E2IMAGE_PROG= e2image
15@IMAGER_CMT@E2IMAGE_MAN= e2image.8
16
17@UUIDD_CMT@UUIDD_PROG= uuidd
18@UUIDD_CMT@UUIDD_MAN= uuidd.8
19
20@BLKID_CMT@BLKID_PROG= blkid
21@BLKID_CMT@BLKID_MAN= blkid.8
22
23@BLKID_CMT@FINDFS_LINK= findfs
24@BLKID_CMT@FINDFS_MAN= findfs.8
25
26SPROGS=		mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
27			$(E2IMAGE_PROG) @FSCK_PROG@ e2undo
28USPROGS=	mklost+found filefrag e2freefrag $(UUIDD_PROG)
29SMANPAGES=	tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
30			e2label.8 $(FINDFS_MAN) $(BLKID_MAN) $(E2IMAGE_MAN) \
31			logsave.8 filefrag.8 e2freefrag.8 e2undo.8 $(UUIDD_MAN) @FSCK_MAN@
32FMANPAGES=	mke2fs.conf.5
33
34UPROGS=		chattr lsattr @UUID_CMT@ uuidgen
35UMANPAGES=	chattr.1 lsattr.1 @UUID_CMT@ uuidgen.1
36
37LPROGS=		@E2INITRD_PROG@
38
39TUNE2FS_OBJS=	tune2fs.o util.o
40MKLPF_OBJS=	mklost+found.o
41MKE2FS_OBJS=	mke2fs.o util.o profile.o prof_err.o default_profile.o
42CHATTR_OBJS=	chattr.o
43LSATTR_OBJS=	lsattr.o
44UUIDGEN_OBJS=	uuidgen.o
45UUIDD_OBJS=	uuidd.o
46DUMPE2FS_OBJS=	dumpe2fs.o
47BADBLOCKS_OBJS=	badblocks.o
48E2IMAGE_OBJS=	e2image.o
49FSCK_OBJS=	fsck.o base_device.o ismounted.o
50BLKID_OBJS=	blkid.o
51FILEFRAG_OBJS=	filefrag.o
52E2UNDO_OBJS=  e2undo.o
53E2FREEFRAG_OBJS= e2freefrag.o
54
55PROFILED_TUNE2FS_OBJS=	profiled/tune2fs.o profiled/util.o
56PROFILED_MKLPF_OBJS=	profiled/mklost+found.o
57PROFILED_MKE2FS_OBJS=	profiled/mke2fs.o profiled/util.o profiled/profile.o \
58			profiled/prof_err.o profiled/default_profile.o
59PROFILED_CHATTR_OBJS=	profiled/chattr.o
60PROFILED_LSATTR_OBJS=	profiled/lsattr.o
61PROFILED_UUIDGEN_OBJS=	profiled/uuidgen.o
62PROFILED_UUIDD_OBJS=	profiled/uuidd.o
63PROFILED_DUMPE2FS_OBJS=	profiled/dumpe2fs.o
64PROFILED_BADBLOCKS_OBJS=	profiled/badblocks.o
65PROFILED_E2IMAGE_OBJS=	profiled/e2image.o
66PROFILED_FSCK_OBJS=	profiled/fsck.o profiled/base_device.o \
67			profiled/ismounted.o
68PROFILED_BLKID_OBJS=	profiled/blkid.o
69PROFILED_FILEFRAG_OBJS=	profiled/filefrag.o
70PROFILED_E2UNDO_OBJS=	profiled/e2undo.o
71
72
73XTRA_CFLAGS=	-I$(srcdir)/../e2fsck -I.
74
75SRCS=	$(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
76		$(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \
77		$(srcdir)/badblocks.c $(srcdir)/fsck.c $(srcdir)/util.c \
78		$(srcdir)/uuidgen.c $(srcdir)/blkid.c $(srcdir)/logsave.c \
79		$(srcdir)/filefrag.c $(srcdir)/base_device.c \
80		$(srcdir)/ismounted.c $(srcdir)/../e2fsck/profile.c \
81		$(srcdir)/e2undo.c $(srcdir)/e2freefrag.c
82
83LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
84DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR)
85PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR)
86PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(DEPPROFILED_LIBCOM_ERR)
87
88STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
89STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) 
90
91LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR) 
92DEPLIBS_E2P= $(LIBE2P) $(DEPLIBCOM_ERR) 
93
94COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
95
96.c.o:
97	$(E) "	CC $<"
98	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
99@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
100
101all:: profiled $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES) \
102	$(FMANPAGES) $(LPROGS)
103
104@PROFILE_CMT@all:: tune2fs.profiled blkid.profiled e2image.profiled \
105	e2undo.profiled mke2fs.profiled dumpe2fs.profiled fsck.profiled \
106	logsave.profiled filefrag.profiled uuidgen.profiled uuidd.profiled \
107	e2image.profiled
108
109profiled:
110@PROFILE_CMT@	$(E) "	MKDIR $@"
111@PROFILE_CMT@	$(Q) mkdir profiled
112
113prof_err.c prof_err.h: $(srcdir)/../e2fsck/prof_err.et
114	$(E) "	COMPILE_ET prof_err.et"
115	$(Q) $(COMPILE_ET) $(srcdir)/../e2fsck/prof_err.et
116
117default_profile.c: $(srcdir)/mke2fs.conf $(srcdir)/profile-to-c.awk
118	$(E) "	PROFILE_TO_C mke2fs.conf"
119	$(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < $(srcdir)/mke2fs.conf \
120		>  default_profile.c
121profile.o:
122	$(E) "	CC $<"
123	$(Q) $(CC) -c $(ALL_CFLAGS) $(srcdir)/../e2fsck/profile.c -o $@
124@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/profile.o -c \
125@PROFILE_CMT@	$(srcdir)/../e2fsck/profile.c
126
127findsuper: findsuper.o
128	$(E) "	LD $@"
129	$(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o
130
131partinfo: partinfo.o
132	$(E) "	LD $@"
133	$(Q) $(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o
134
135e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS)
136	$(E) "	LD $@"
137	$(Q) $(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \
138		$(LIBBLKID) $(LIBEXT2FS) $(LIBINTL)
139
140tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \
141		$(DEPLIBUUID) $(LIBEXT2FS) 
142	$(E) "	LD $@"
143	$(Q) $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \
144		$(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(LIBS_E2P) $(LIBINTL)
145
146tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID)
147	$(E) "	LD $@"
148	$(Q) $(CC) $(LDFLAGS_STATIC) -o tune2fs.static $(TUNE2FS_OBJS) \
149		$(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \
150		$(STATIC_LIBE2P) $(LIBINTL)
151
152tune2fs.profiled: $(PROFILED_TUNE2FS_OBJS) $(PROFILED_DEPLIBS) \
153		$(PROFILED_E2P) $(DEPPROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID)
154	$(E) "	LD $@"
155	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o tune2fs.profiled \
156		$(PROFILED_TUNE2FS_OBJS) $(PROFILED_LIBBLKID) \
157		$(PROFILED_LIBUUID) $(PROFILED_LIBE2P) $(LIBINTL) \
158		$(PROFILED_LIBS) 
159
160blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS)
161	$(E) "	LD $@"
162	$(Q) $(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \
163		$(LIBEXT2FS)
164
165blkid.static: $(BLKID_OBJS) $(STATIC_DEPLIBS) $(DEPSTATIC_LIBBLKID)
166	$(E) "	LD $@"
167	$(Q) $(CC) $(ALL_LDFLAGS) -o blkid.static $(BLKID_OBJS) $(STATIC_LIBS) \
168		$(STATIC_LIBBLKID) $(LIBINTL)
169
170blkid.profiled: $(PROFILED_BLKID_OBJS) $(DEPPROFILED_LIBBLKID) \
171		$(PROFILED_LIBEXT2FS)
172	$(E) "	LD $@"
173	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o blkid.profiled $(PROFILED_BLKID_OBJS) \
174		$(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS)
175
176e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
177	$(E) "	LD $@"
178	$(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) $(LIBINTL)
179
180e2image.profiled: $(PROFILED_E2IMAGE_OBJS) $(PROFILED_DEPLIBS)
181	$(E) "	LD $@"
182	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2image.profiled \
183		$(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL)
184
185e2undo: $(E2UNDO_OBJS) $(DEPLIBS)
186	$(E) "	LD $@"
187	$(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) $(LIBINTL)
188
189e2undo.profiled: $(PROFILED_E2UNDO_OBJS) $(PROFILED_DEPLIBS)
190	$(E) "	LD $@"
191	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2undo.profiled \
192		$(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL)
193
194base_device: base_device.c
195	$(E) "	LD $@"
196	$(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
197		-DDEBUG -o base_device
198
199check:: base_device
200	./base_device < $(srcdir)/base_device.tst > base_device.out
201	cmp $(srcdir)/base_device.tst base_device.out
202
203mklost+found: $(MKLPF_OBJS)
204	$(E) "	LD $@"
205	$(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL)
206
207mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \
208		$(LIBEXT2FS) 
209	$(E) "	LD $@"
210	$(Q) $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \
211		$(LIBUUID) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL)
212
213mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBBLKID)
214	$(E) "	LD $@"
215	$(Q) $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
216		$(STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBBLKID) \
217		$(STATIC_LIBUUID) $(LIBINTL)
218
219mke2fs.profiled: $(PROFILED_MKE2FS_OBJS) $(PROFILED_DEPLIBS) \
220	$(PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID) 
221	$(E) "	LD $@"
222	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o mke2fs.profiled \
223		$(PROFILED_MKE2FS_OBJS) $(PROFILED_LIBBLKID) \
224		$(PROFILED_LIBUUID) $(PROFILED_LIBE2P) $(LIBINTL) \
225		$(PROFILED_LIBS)
226
227chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
228	$(E) "	LD $@"
229	$(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
230
231lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
232	$(E) "	LD $@"
233	$(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
234
235uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
236	$(E) "	LD $@"
237	$(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) $(LIBINTL)
238
239uuidgen.profiled: $(PROFILED_UUIDGEN_OBJS) $(PROFILED_DEPLIBUUID)
240	$(E) "	LD $@"
241	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidgen.profiled \
242		$(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL)
243
244uuidd: $(UUIDD_OBJS) $(DEPLIBUUID)
245	$(E) "	LD $@"
246	$(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) $(LIBINTL)
247
248uuidd.profiled: $(PROFILED_UUIDD_OBJS) $(PROFILED_DEPLIBUUID)
249	$(E) "	LD $@"
250	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidd.profiled $(PROFILED_UUIDD_OBJS) \
251		$(PROFILED_LIBUUID) $(LIBINTL)
252
253dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID)
254	$(E) "	LD $@"
255	$(Q) $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \
256		$(LIBS_E2P) $(LIBUUID) $(LIBINTL)
257
258dumpe2fs.profiled: $(PROFILED_DUMPE2FS_OBJS) $(PROFILED_DEPLIBS) \
259		$(PROFILED_LIBE2P) $(PROFILED_DEPLIBUUID)
260	$(E) "	LD $@"
261	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o dumpe2fs.profiled \
262		$(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \
263		$(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL)
264
265fsck: $(FSCK_OBJS) $(DEPLIBBLKID)
266	$(E) "	LD $@"
267	$(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL)
268
269fsck.profiled: $(PROFILED_FSCK_OBJS) $(PROFILED_DEPLIBBLKID)
270	$(E) "	LD $@"
271	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \
272		$(PROFILED_LIBBLKID) $(LIBINTL)
273
274badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
275	$(E) "	LD $@"
276	$(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) $(LIBINTL)
277
278badblocks.profiled: $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_DEPLIBS)
279	$(E) "	LD $@"
280	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o badblocks.profiled \
281		$(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL)
282
283logsave: logsave.o
284	$(E) "	LD $@"
285	$(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o
286
287logsave.profiled: profiled/logsave.o
288	$(E) "	LD $@"
289	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled profiled/logsave.o
290
291e2freefrag: $(E2FREEFRAG_OBJS)
292	$(E) "	LD $@"
293	$(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) $(LIBS)
294
295filefrag: $(FILEFRAG_OBJS)
296	$(E) "	LD $@"
297	$(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) 
298
299filefrag.profiled: $(PROFILED_FILEFRAG_OBJS)
300	$(E) "	LD $@"
301	$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o filefrag.profiled \
302		$(PROFILED_FILEFRAG_OBJS) 
303
304tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
305	$(E) "	LD $@"
306	$(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) \
307		$(LIBCOM_ERR)
308
309tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
310	$(E) "	SUBST $@"
311	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/tune2fs.8.in tune2fs.8
312
313mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
314	$(E) "	SUBST $@"
315	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mklost+found.8.in mklost+found.8
316
317mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
318	$(E) "	SUBST $@"
319	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mke2fs.8.in mke2fs.8
320
321mke2fs.conf.5: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.conf.5.in
322	$(E) "	SUBST $@"
323	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/mke2fs.conf.5.in mke2fs.conf.5
324
325e2label.8: $(DEP_SUBSTITUTE) $(srcdir)/e2label.8.in
326	$(E) "	SUBST $@"
327	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2label.8.in e2label.8
328
329e2undo.8: $(DEP_SUBSTITUTE) $(srcdir)/e2undo.8.in
330	$(E) "	SUBST $@"
331	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2undo.8.in e2undo.8
332
333findfs.8: $(DEP_SUBSTITUTE) $(srcdir)/findfs.8.in
334	$(E) "	SUBST $@"
335	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/findfs.8.in findfs.8
336
337e2image.8: $(DEP_SUBSTITUTE) $(srcdir)/e2image.8.in
338	$(E) "	SUBST $@"
339	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2image.8.in e2image.8
340
341dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in 
342	$(E) "	SUBST $@"
343	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
344
345badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
346	$(E) "	SUBST $@"
347	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/badblocks.8.in badblocks.8	
348
349fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
350	$(E) "	SUBST $@"
351	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/fsck.8.in fsck.8 
352
353blkid.8: $(DEP_SUBSTITUTE) $(srcdir)/blkid.8.in
354	$(E) "	SUBST $@"
355	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/blkid.8.in blkid.8
356
357logsave.8: $(DEP_SUBSTITUTE) $(srcdir)/logsave.8.in
358	$(E) "	SUBST $@"
359	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/logsave.8.in logsave.8
360
361uuidd.8: $(DEP_SUBSTITUTE) $(srcdir)/uuidd.8.in
362	$(E) "	SUBST $@"
363	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuidd.8.in uuidd.8
364
365chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
366	$(E) "	SUBST $@"
367	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/chattr.1.in chattr.1 
368
369lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in 
370	$(E) "	SUBST $@"
371	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/lsattr.1.in lsattr.1 
372
373uuidgen.1: $(DEP_SUBSTITUTE) $(srcdir)/uuidgen.1.in 
374	$(E) "	SUBST $@"
375	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuidgen.1.in uuidgen.1 
376
377blkid.1: $(DEP_SUBSTITUTE) $(srcdir)/blkid.1.in 
378	$(E) "	SUBST $@"
379	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/blkid.1.in blkid.1 
380
381e2freefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/e2freefrag.8.in
382	@echo "	SUBST $@"
383	@$(SUBSTITUTE_UPTIME) $(srcdir)/e2freefrag.8.in e2freefrag.8
384
385filefrag.8: $(DEP_SUBSTITUTE) $(srcdir)/filefrag.8.in
386	$(E) "	SUBST $@"
387	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8
388
389installdirs:
390	$(E) "	MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir) $(root_sysconfdir)"
391	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(sbindir) \
392		$(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
393		$(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
394		$(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \
395		$(DESTDIR)$(libdir) $(DESTDIR)/$(root_sysconfdir)
396
397install: all $(SMANPAGES) $(UMANPAGES) installdirs
398	$(Q) for i in $(SPROGS); do \
399		echo "	INSTALL $(root_sbindir)/$$i"; \
400		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
401	done
402	$(Q) for i in $(USPROGS); do \
403		echo "	INSTALL $(sbindir)/$$i"; \
404		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
405	done
406	$(Q) for i in ext2 ext3 ext4 ext4dev; do \
407		echo "	LINK $(root_sbindir)/mkfs.$$i"; \
408		(cd $(DESTDIR)$(root_sbindir); \
409			$(LN) $(LINK_INSTALL_FLAGS) mke2fs mkfs.$$i); \
410	done
411	$(Q) (cd $(DESTDIR)$(root_sbindir); \
412		$(LN) $(LINK_INSTALL_FLAGS) tune2fs e2label)
413	$(Q) if test -n "$(FINDFS_LINK)"; then \
414		echo "	LINK $(root_sbindir)/findfs"; \
415		(cd $(DESTDIR)$(root_sbindir); \
416		$(LN) $(LINK_INSTALL_FLAGS) tune2fs $(FINDFS_LINK)); \
417	fi
418	$(Q) for i in $(UPROGS); do \
419		echo "	INSTALL $(bindir)/$$i"; \
420		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$i; \
421	done
422	$(Q) for i in $(LPROGS); do \
423		echo "	INSTALL $(libdir)/$$i"; \
424		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(libdir)/$$i; \
425	done
426	$(Q) for i in $(SMANPAGES); do \
427		for j in $(COMPRESS_EXT); do \
428			$(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
429		done; \
430		echo "	INSTALL_DATA $(man8dir)/$$i"; \
431		$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
432	done
433	$(Q) $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \
434		$(DESTDIR)$(man8dir)/mkfs.ext3.8.gz
435	$(Q) for i in ext2 ext3 ext4 ext4dev; do \
436		echo "	LINK mkfs.$$i.8"; \
437		(cd $(DESTDIR)$(man8dir); \
438			$(LN) $(LINK_INSTALL_FLAGS) mke2fs.8 mkfs.$$i.8); \
439	done
440	$(Q) for i in $(UMANPAGES); do \
441		for j in $(COMPRESS_EXT); do \
442			$(RM) -f $(DESTDIR)$(man1dir)/$$i.$$j; \
443		done; \
444		echo "	INSTALL_DATA $(man1dir)/$$i"; \
445		$(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
446	done
447	$(Q) for i in $(FMANPAGES); do \
448		for j in $(COMPRESS_EXT); do \
449			$(RM) -f $(DESTDIR)$(man5dir)/$$i.$$j; \
450		done; \
451		echo "	INSTALL_DATA $(man5dir)/$$i"; \
452		$(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
453	done
454	$(Q) if test -f $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; then \
455		if cmp -s $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \
456			$(srcdir)/mke2fs.conf; then \
457			true; \
458		else \
459			if grep -q ext4dev $(DESTDIR)$(root_sysconfdir)/mke2fs.conf ; then \
460				echo "	INSTALL_DATA $(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \
461				$(INSTALL_DATA) $(srcdir)/mke2fs.conf \
462					$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new; \
463				echo "Warning: installing mke2fs.conf in $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-new"; \
464				echo "Check to see if you need to update your $(root_sysconfdir)/mke2fs.conf"; \
465			else \
466				echo "	INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \
467				mv $(DESTDIR)$(root_sysconfdir)/mke2fs.conf \
468				   $(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old; \
469				$(INSTALL_DATA) $(srcdir)/mke2fs.conf \
470					$(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \
471				echo "Your mke2fs.conf is too old.  Backing up old version in"; \
472				echo "$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.e2fsprogs-old.  Please check to see"; \
473				echo "if you have any local customizations that you wish to preserve."; \
474			fi; \
475			echo " "; \
476		fi; \
477	else \
478		echo "	INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \
479		$(INSTALL_DATA) $(srcdir)/mke2fs.conf \
480			$(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \
481	fi
482
483install-strip: install
484	$(Q) for i in $(SPROGS); do \
485		echo "	STRIP $(root_sbindir)/$$i"; \
486		$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
487	done
488	$(Q) for i in $(USPROGS); do \
489		echo "	STRIP $(sbindir)/$$i"; \
490		$(STRIP) $(DESTDIR)$(sbindir)/$$i; \
491	done
492
493uninstall:
494	for i in $(SPROGS); do \
495		$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
496	done
497	for i in $(USPROGS); do \
498		$(RM) -f $(DESTDIR)$(sbindir)/$$i; \
499	done
500	for i in $(LPROGS); do \
501		$(RM) -f $(DESTDIR)$(libdir)/$$i; \
502	done
503	$(RM) -f $(DESTDIR)$(root_sbindir)/mkfs.ext2 \
504			$(DESTDIR)$(root_sbindir)/mkfs.ext3 \
505			$(DESTDIR)$(root_sbindir)/mkfs.ext4 \
506			$(DESTDIR)$(root_sbindir)/mkfs.ext4dev
507	for i in $(UPROGS); do \
508		$(RM) -f $(DESTDIR)$(bindir)/$$i; \
509	done
510	for i in $(SMANPAGES); do \
511		$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
512	done
513	$(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8 \
514		$(DESTDIR)$(man8dir)/mkfs.ext3.8 \
515		$(DESTDIR)$(man8dir)/mkfs.ext4.8 \
516		$(DESTDIR)$(man8dir)/mkfs.ext4dev.8
517	for i in $(UMANPAGES); do \
518		$(RM) -f $(DESTDIR)$(man1dir)/$$i; \
519	done
520	for i in $(FINDFS_LINK) e2label ; do \
521		$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
522	done
523	for i in $(FMANPAGES); do \
524		$(RM) -f $(DESTDIR)$(man5dir)/$$i; \
525	done
526	if cmp -s $(srcdir)/mke2fs.conf $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; then \
527		$(RM) $(DESTDIR)/$(root_sysconfdir)/mke2fs.conf; \
528	fi
529
530clean:
531	$(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
532		$(FMANPAGES) \
533		base_device base_device.out mke2fs.static filefrag e2freefrag \
534		e2initrd_helper partinfo prof_err.[ch] default_profile.c \
535		uuidd e2image tune2fs.static tst_ismounted fsck.profiled \
536		blkid.profiled tune2fs.profiled e2image.profiled \
537		e2undo.profiled mke2fs.profiled dumpe2fs.profiled \
538		logsave.profiled filefrag.profiled uuidgen.profiled \
539		uuidd.profiled e2image.profiled \
540		profiled/*.o \#* *.s *.o *.a *~ core gmon.out
541
542mostlyclean: clean
543distclean: clean
544	$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
545
546# +++ Dependency line eater +++
547# 
548# Makefile dependencies follow.  This must be the last section in
549# the Makefile.in file
550#
551tune2fs.o: $(srcdir)/tune2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
552 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
553 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
554 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
555 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
556 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
557 $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
558 $(top_srcdir)/lib/ext2fs/kernel-list.h $(srcdir)/util.h \
559 $(top_srcdir)/version.h $(srcdir)/nls-enable.h
560mklost+found.o: $(srcdir)/mklost+found.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
561 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/version.h \
562 $(srcdir)/nls-enable.h
563mke2fs.o: $(srcdir)/mke2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
564 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
565 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
566 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
567 $(top_builddir)/lib/ext2fs/ext2_err.h \
568 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
569 $(srcdir)/util.h $(srcdir)/../e2fsck/profile.h prof_err.h \
570 $(top_srcdir)/version.h $(srcdir)/nls-enable.h
571chattr.o: $(srcdir)/chattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
572 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
573 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
574lsattr.o: $(srcdir)/lsattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
575 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
576 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
577dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
578 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
579 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
580 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
581 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
582 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
583 $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
584 $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/version.h \
585 $(srcdir)/nls-enable.h
586badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
587 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
588 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
589 $(top_srcdir)/lib/ext2fs/ext3_extents.h \
590 $(top_builddir)/lib/ext2fs/ext2_err.h \
591 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
592 $(srcdir)/nls-enable.h
593fsck.o: $(srcdir)/fsck.c $(top_srcdir)/version.h $(srcdir)/nls-enable.h \
594 $(srcdir)/fsck.h
595util.o: $(srcdir)/util.c $(top_srcdir)/lib/et/com_err.h \
596 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
597 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
598 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
599 $(top_builddir)/lib/ext2fs/ext2_err.h \
600 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
601 $(srcdir)/nls-enable.h $(srcdir)/util.h
602uuidgen.o: $(srcdir)/uuidgen.c $(srcdir)/nls-enable.h
603blkid.o: $(srcdir)/blkid.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
604 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
605 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
606 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
607 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
608logsave.o: $(srcdir)/logsave.c
609filefrag.o: $(srcdir)/filefrag.c $(top_builddir)/lib/ext2fs/ext2_types.h \
610 $(top_srcdir)/lib/ext2fs/fiemap.h
611base_device.o: $(srcdir)/base_device.c $(srcdir)/fsck.h
612ismounted.o: $(srcdir)/ismounted.c $(srcdir)/fsck.h \
613 $(top_srcdir)/lib/et/com_err.h
614profile.o: $(srcdir)/../e2fsck/profile.c $(top_srcdir)/lib/et/com_err.h \
615 $(srcdir)/../e2fsck/profile.h prof_err.h
616e2undo.o: $(srcdir)/e2undo.c $(top_srcdir)/lib/ext2fs/tdb.h \
617 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
618 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
619 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
620 $(top_builddir)/lib/ext2fs/ext2_err.h \
621 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
622 $(srcdir)/nls-enable.h
623e2freefrag.o: $(srcdir)/e2freefrag.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
624 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
625 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
626 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
627 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
628 $(srcdir)/e2freefrag.h
629