]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - resize/Makefile.in
Add coverage testing using gcov
[thirdparty/e2fsprogs.git] / resize / Makefile.in
CommitLineData
24b2c7a7
TT
1#
2# Standard e2fsprogs prologue....
3#
4
5srcdir = @srcdir@
6top_srcdir = @top_srcdir@
7VPATH = @srcdir@
8top_builddir = ..
9my_dir = resize
10INSTALL = @INSTALL@
0e14f78e 11LDFLAG_STATIC = @LDFLAG_STATIC@
24b2c7a7
TT
12
13@MCONFIG@
14
15PROGS= resize2fs
c762c8e6 16TEST_PROGS= test_extent
24b2c7a7
TT
17MANPAGES= resize2fs.8
18
1eb31c48
TT
19RESIZE_OBJS= extent.o resize2fs.o main.o online.o resource_track.o \
20 sim_progress.o
24b2c7a7 21
c762c8e6
TT
22TEST_EXTENT_OBJS= extent.o test_extent.o
23
24SRCS= $(srcdir)/extent.c \
052db4b7 25 $(srcdir)/resize2fs.c \
c762c8e6 26 $(srcdir)/main.c \
bf69235a 27 $(srcdir)/online.c \
1eb31c48 28 $(srcdir)/resource_track.c \
c762c8e6 29 $(srcdir)/sim_progress.c
24b2c7a7 30
6c59a665 31LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
a6a1c081 32DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR)
24b2c7a7 33
55f4cbd9 34STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
6c59a665 35 $(LIBINTL) $(SYSLIBS)
a6a1c081 36DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
0e14f78e 37
24b2c7a7 38.c.o:
c13351f6
TT
39 $(E) " CC $<"
40 $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
832cb612 41 $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
24b2c7a7 42
0cee8a5c 43all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
24b2c7a7
TT
44
45resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
c13351f6
TT
46 $(E) " LD $@"
47 $(Q) $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
24b2c7a7 48
a6a1c081 49resize2fs.static: $(RESIZE_OBJS) $(DEPSTATIC_LIBS)
c13351f6
TT
50 $(E) " LD $@"
51 $(Q) $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
0e14f78e
TT
52 $(RESIZE_OBJS) $(STATIC_LIBS)
53
44339bdf 54resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
c13351f6
TT
55 $(E) " SUBST $@"
56 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/resize2fs.8.in resize2fs.8
24b2c7a7 57
c762c8e6 58test_extent: $(TEST_EXTENT_OBJS)
c13351f6
TT
59 $(E) " LD $@"
60 $(Q) $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
dd607056 61
24b2c7a7 62installdirs:
c13351f6
TT
63 $(E) " MKINSTALLDIRS $(root_sbindir) $(man8dir)"
64 $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
d171c5b5 65 $(DESTDIR)$(man8dir)
24b2c7a7
TT
66
67install: $(PROGS) $(MANPAGES) installdirs
c13351f6 68 $(Q) for i in $(PROGS); do \
522798d3 69 echo " INSTALL $(root_sbindir)/$$i"; \
e4c8e885 70 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
24b2c7a7 71 done
c13351f6 72 $(Q) for i in $(MANPAGES); do \
482afc44
TT
73 for j in $(COMPRESS_EXT); do \
74 $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
75 done; \
522798d3 76 echo " INSTALL_DATA $(man8dir)/$$i"; \
24b2c7a7
TT
77 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
78 done
79
522798d3 80install-strip: install
c13351f6 81 $(Q) for i in $(PROGS); do \
522798d3
TT
82 echo " STRIP $(root_sbindir)/$$i"; \
83 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
84 done
85
24b2c7a7
TT
86uninstall:
87 for i in $(PROGS); do \
e4c8e885 88 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
24b2c7a7
TT
89 done
90 for i in $(MANPAGES); do \
d171c5b5 91 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
24b2c7a7
TT
92 done
93
c762c8e6 94test_extent.out: test_extent $(srcdir)/test_extent.in
afb6d709 95 LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
304905df 96 > test_extent.out
c762c8e6 97
3e377db2 98check:: test_extent.out
c13351f6 99 $(Q) if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
c762c8e6
TT
100 echo "Test succeeded." ; \
101 else \
102 echo "Test failed!" ; \
103 diff test_extent.out $(srcdir)/test_extent.in ; \
104 exit 1 ; \
105 fi
dd607056 106
fedfb27f 107clean::
c762c8e6 108 $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
790a0ad4 109 resize2fs.static test_extent.out
24b2c7a7
TT
110
111mostlyclean: clean
5c36a2f8 112
24b2c7a7 113distclean: clean
5c36a2f8 114 $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
24b2c7a7 115
c762c8e6
TT
116#
117# Kludge to create a "special" e2fsprogs distribution file.
118#
119
120SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
121 -e 's/pre-//' -e 's/-PLUS//'`
122TAR=tar
123
124$(top_srcdir)/.exclude-file:
8e74e669 125 a=$(SRCROOT); \
c762c8e6 126 (cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
8e74e669
TT
127 -o -name CVS -o -name \*.rej \) -print) \
128 | sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
c762c8e6
TT
129 echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
130 echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
fac9c206 131 echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
c762c8e6
TT
132 echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
133 echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
134 >> $(top_srcdir)/.exclude-file
fac9c206
TT
135 echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
136 >> $(top_srcdir)/.exclude-file
dd607056 137
c762c8e6
TT
138source_tar_file: $(top_srcdir)/.exclude-file
139 (cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
140 $(TAR) -c -h -v -f - \
141 -X $$a/.exclude-file $$a | \
fac9c206 142 gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
c762c8e6
TT
143 rm -f $(top_srcdir)/.exclude-file
144
24b2c7a7
TT
145# +++ Dependency line eater +++
146#
147# Makefile dependencies follow. This must be the last section in
148# the Makefile.in file
149#
1eb31c48
TT
150extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \
151 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
797f5ef1 152 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
e1f08507 153 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
75e93ab0 154 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
e1f08507
TT
155 $(top_builddir)/lib/ext2fs/ext2_err.h \
156 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
157 $(top_srcdir)/lib/e2p/e2p.h
1eb31c48
TT
158resize2fs.o: $(srcdir)/resize2fs.c $(top_builddir)/lib/config.h \
159 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
797f5ef1 160 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
e1f08507 161 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
75e93ab0 162 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
e1f08507
TT
163 $(top_builddir)/lib/ext2fs/ext2_err.h \
164 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
165 $(top_srcdir)/lib/e2p/e2p.h
1eb31c48
TT
166main.o: $(srcdir)/main.c $(top_builddir)/lib/config.h \
167 $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/e2p/e2p.h \
797f5ef1 168 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
75e93ab0 169 $(srcdir)/resize2fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
e1f08507
TT
170 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
171 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
172 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
75e93ab0 173 $(top_srcdir)/version.h
1eb31c48
TT
174online.o: $(srcdir)/online.c $(top_builddir)/lib/config.h \
175 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
bf69235a 176 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
e1f08507 177 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
bf69235a 178 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
e1f08507
TT
179 $(top_builddir)/lib/ext2fs/ext2_err.h \
180 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
181 $(top_srcdir)/lib/e2p/e2p.h
1eb31c48
TT
182resource_track.o: $(srcdir)/resource_track.c $(top_builddir)/lib/config.h \
183 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
184 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
185 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
186 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
187 $(top_builddir)/lib/ext2fs/ext2_err.h \
188 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
189 $(top_srcdir)/lib/e2p/e2p.h
190sim_progress.o: $(srcdir)/sim_progress.c $(top_builddir)/lib/config.h \
191 $(top_builddir)/lib/dirpaths.h $(srcdir)/resize2fs.h \
797f5ef1 192 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
e1f08507 193 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
75e93ab0 194 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
e1f08507
TT
195 $(top_builddir)/lib/ext2fs/ext2_err.h \
196 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
197 $(top_srcdir)/lib/e2p/e2p.h