Whamcloud - gitweb
Update "make depend" information. Fixes SMP parallel build problem.
[tools/e2fsprogs.git] / resize / Makefile.in
1 #
2 # Standard e2fsprogs prologue....
3 #
4
5 srcdir = @srcdir@
6 top_srcdir = @top_srcdir@
7 VPATH = @srcdir@
8 top_builddir = ..
9 my_dir = resize
10 INSTALL = @INSTALL@
11 LDFLAG_STATIC = @LDFLAG_STATIC@
12
13 @MCONFIG@
14
15 PROGS=          resize2fs
16 TEST_PROGS=     test_extent
17 MANPAGES=       resize2fs.8
18
19 RESIZE_OBJS= extent.o resize2fs.o main.o sim_progress.o 
20
21 TEST_EXTENT_OBJS= extent.o test_extent.o
22
23 SRCS= $(srcdir)/extent.c \
24         $(srcdir)/resize2fs.c \
25         $(srcdir)/main.c \
26         $(srcdir)/sim_progress.c
27
28 LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL)
29 DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR)
30
31 STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
32         $(LIBINTL)
33 STATIC_DEPLIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
34
35 .c.o:
36         @echo " CC $<"
37         @$(CC) -c $(ALL_CFLAGS) $< -o $@
38
39 all:: $(PROGS) $(TEST_PROGS) $(MANPAGES) 
40
41 resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
42         @echo " LD $@"
43         @$(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS) 
44
45 resize2fs.static: $(RESIZE_OBJS)  $(STATIC_DEPLIBS)
46         @echo " LD $@"
47         @$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
48                 $(RESIZE_OBJS) $(STATIC_LIBS) 
49
50 resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
51         @echo " SUBST $@"
52         @$(SUBSTITUTE_UPTIME) $(srcdir)/resize2fs.8.in resize2fs.8
53
54 test_extent: $(TEST_EXTENT_OBJS)
55         @echo " LD $@"
56         @$(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS) 
57
58 installdirs:
59         @echo " MKINSTALLDIRS $(root_sbindir) $(man8dir)"
60         @$(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
61                 $(DESTDIR)$(man8dir)
62
63 install: $(PROGS) $(MANPAGES) installdirs
64         @for i in $(PROGS); do \
65                 echo "  INSTALL $(root_sbindir)/$$i"; \
66                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
67         done
68         @for i in $(MANPAGES); do \
69                 for j in $(COMPRESS_EXT); do \
70                         $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
71                 done; \
72                 echo "  INSTALL_DATA $(man8dir)/$$i"; \
73                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
74         done
75
76 install-strip: install
77         @for i in $(PROGS); do \
78                 echo "  STRIP $(root_sbindir)/$$i"; \
79                 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
80         done
81
82 uninstall:
83         for i in $(PROGS); do \
84                 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
85         done
86         for i in $(MANPAGES); do \
87                 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
88         done
89
90 test_extent.out: test_extent $(srcdir)/test_extent.in
91         LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
92                 > test_extent.out
93
94 check:: test_extent.out
95         @if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
96                 echo "Test succeeded." ; \
97         else \
98                 echo "Test failed!" ; \
99                 diff test_extent.out $(srcdir)/test_extent.in ; \
100                 exit 1 ; \
101         fi
102
103 clean:
104         $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
105                 resize2fs.static test_extent.out
106
107 mostlyclean: clean
108
109 distclean: clean
110         $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
111
112 #
113 # Kludge to create a "special" e2fsprogs distribution file.
114 #
115
116 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
117                         -e 's/pre-//' -e 's/-PLUS//'`
118 TAR=tar
119
120 $(top_srcdir)/.exclude-file:
121         a=$(SRCROOT); \
122         (cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
123                 -o -name CVS -o -name \*.rej \) -print) \
124                 | sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
125         echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
126         echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
127         echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
128         echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
129         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
130                 >> $(top_srcdir)/.exclude-file
131         echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
132                 >> $(top_srcdir)/.exclude-file
133
134 source_tar_file: $(top_srcdir)/.exclude-file
135         (cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
136                 $(TAR) -c -h -v -f - \
137                         -X $$a/.exclude-file $$a | \
138                 gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
139         rm -f $(top_srcdir)/.exclude-file
140
141 # +++ Dependency line eater +++
142
143 # Makefile dependencies follow.  This must be the last section in
144 # the Makefile.in file
145 #
146 extent.o: $(srcdir)/extent.c $(srcdir)/resize2fs.h \
147  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
148  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
149  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
150  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
151 resize2fs.o: $(srcdir)/resize2fs.c $(srcdir)/resize2fs.h \
152  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
153  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
154  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
155  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
156 main.o: $(srcdir)/main.c $(top_srcdir)/lib/e2p/e2p.h \
157  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
158  $(srcdir)/resize2fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
159  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
160  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
161  $(top_srcdir)/version.h
162 sim_progress.o: $(srcdir)/sim_progress.c $(srcdir)/resize2fs.h \
163  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
164  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
165  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
166  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h