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