xref: /aosp_15_r20/external/e2fsprogs/lib/et/Makefile.in (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker#
2*6a54128fSAndroid Build Coastguard Worker# Makefile for lib/et
3*6a54128fSAndroid Build Coastguard Worker#
4*6a54128fSAndroid Build Coastguard Worker
5*6a54128fSAndroid Build Coastguard Workersrcdir = @srcdir@
6*6a54128fSAndroid Build Coastguard Workertop_srcdir = @top_srcdir@
7*6a54128fSAndroid Build Coastguard WorkerVPATH = @srcdir@
8*6a54128fSAndroid Build Coastguard Workertop_builddir = ../..
9*6a54128fSAndroid Build Coastguard Workermy_dir = lib/et
10*6a54128fSAndroid Build Coastguard WorkerINSTALL = @INSTALL@
11*6a54128fSAndroid Build Coastguard WorkerMKDIR_P = @MKDIR_P@
12*6a54128fSAndroid Build Coastguard Worker
13*6a54128fSAndroid Build Coastguard WorkerDEP_MAKEFILE = $(DEP_LIB_MAKEFILES)
14*6a54128fSAndroid Build Coastguard Worker
15*6a54128fSAndroid Build Coastguard Worker@MCONFIG@
16*6a54128fSAndroid Build Coastguard Worker
17*6a54128fSAndroid Build Coastguard Workerall:: compile_et com_err.pc
18*6a54128fSAndroid Build Coastguard Worker
19*6a54128fSAndroid Build Coastguard WorkerOBJS= error_message.o et_name.o init_et.o com_err.o com_right.o
20*6a54128fSAndroid Build Coastguard WorkerSRCS = $(srcdir)/error_message.c $(srcdir)/et_name.c $(srcdir)/init_et.c \
21*6a54128fSAndroid Build Coastguard Worker	$(srcdir)/com_err.c $(srcdir)/com_right.c
22*6a54128fSAndroid Build Coastguard Worker
23*6a54128fSAndroid Build Coastguard WorkerHFILES= com_err.h
24*6a54128fSAndroid Build Coastguard WorkerSHARE_FILES= et_c.awk et_h.awk
25*6a54128fSAndroid Build Coastguard Worker
26*6a54128fSAndroid Build Coastguard WorkerLIBRARY= libcom_err
27*6a54128fSAndroid Build Coastguard WorkerLIBDIR= et
28*6a54128fSAndroid Build Coastguard Worker
29*6a54128fSAndroid Build Coastguard WorkerELF_VERSION = 2.1
30*6a54128fSAndroid Build Coastguard WorkerELF_SO_VERSION = 2
31*6a54128fSAndroid Build Coastguard WorkerELF_IMAGE = libcom_err
32*6a54128fSAndroid Build Coastguard WorkerELF_MYDIR = et
33*6a54128fSAndroid Build Coastguard WorkerELF_INSTALL_DIR = $(root_libdir)
34*6a54128fSAndroid Build Coastguard WorkerELF_OTHER_LIBS = @SEM_INIT_LIB@
35*6a54128fSAndroid Build Coastguard Worker
36*6a54128fSAndroid Build Coastguard WorkerBSDLIB_VERSION = 1.1
37*6a54128fSAndroid Build Coastguard WorkerBSDLIB_IMAGE = libcom_err
38*6a54128fSAndroid Build Coastguard WorkerBSDLIB_MYDIR = et
39*6a54128fSAndroid Build Coastguard WorkerBSDLIB_INSTALL_DIR = $(root_libdir)
40*6a54128fSAndroid Build Coastguard Worker
41*6a54128fSAndroid Build Coastguard Worker#
42*6a54128fSAndroid Build Coastguard Worker# what to build...
43*6a54128fSAndroid Build Coastguard Worker#
44*6a54128fSAndroid Build Coastguard Worker.c.o:
45*6a54128fSAndroid Build Coastguard Worker	$(E) "	CC $<"
46*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CC) $(ALL_CFLAGS_STLIB) -c $< -o $@
47*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
48*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
49*6a54128fSAndroid Build Coastguard Worker@PROFILE_CMT@	$(Q) $(CC) $(ALL_CFLAGS_STLIB) -g -pg -o profiled/$*.o -c $<
50*6a54128fSAndroid Build Coastguard Worker@ELF_CMT@	$(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
51*6a54128fSAndroid Build Coastguard Worker@BSDLIB_CMT@	$(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
52*6a54128fSAndroid Build Coastguard Worker
53*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_LIBRARY@
54*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_ELF@
55*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_BSDLIB@
56*6a54128fSAndroid Build Coastguard Worker@MAKEFILE_PROFILE@
57*6a54128fSAndroid Build Coastguard Worker
58*6a54128fSAndroid Build Coastguard Workercompile_et: $(DEP_SUBSTITUTE) $(srcdir)/compile_et.sh.in
59*6a54128fSAndroid Build Coastguard Worker	$(E) "	SUBST $@"
60*6a54128fSAndroid Build Coastguard Worker	$(Q) $(SUBSTITUTE) $(srcdir)/compile_et.sh.in compile_et
61*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CHMOD) +x compile_et
62*6a54128fSAndroid Build Coastguard Worker
63*6a54128fSAndroid Build Coastguard WorkerDVI=texi2dvi
64*6a54128fSAndroid Build Coastguard WorkerDVIPS=dvips -o "$@"
65*6a54128fSAndroid Build Coastguard WorkerINFO=@MAKEINFO@
66*6a54128fSAndroid Build Coastguard WorkerHTML=makeinfo --html --no-split
67*6a54128fSAndroid Build Coastguard WorkerPS2PDF=ps2pdf
68*6a54128fSAndroid Build Coastguard Worker
69*6a54128fSAndroid Build Coastguard Workercom_err.ps : com_err.dvi
70*6a54128fSAndroid Build Coastguard Workercom_err.dvi: com_err.texinfo
71*6a54128fSAndroid Build Coastguard Worker
72*6a54128fSAndroid Build Coastguard Workercom_err.info: $(srcdir)/com_err.texinfo
73*6a54128fSAndroid Build Coastguard Worker	$(E) "	MAKEINFO $@"
74*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(INFO) $(srcdir)/com_err.texinfo
75*6a54128fSAndroid Build Coastguard Worker
76*6a54128fSAndroid Build Coastguard Workercom_err.dvi: $(srcdir)/com_err.texinfo
77*6a54128fSAndroid Build Coastguard Worker	$(E) "	TEXI2DVI $@"
78*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(DVI) $(srcdir)/com_err.texinfo
79*6a54128fSAndroid Build Coastguard Worker
80*6a54128fSAndroid Build Coastguard Workercom_err.ps: com_err.dvi
81*6a54128fSAndroid Build Coastguard Worker	$(E) "	DVIPS $@"
82*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(DVIPS) com_err.dvi
83*6a54128fSAndroid Build Coastguard Worker
84*6a54128fSAndroid Build Coastguard Workercom_err.pdf: com_err.ps
85*6a54128fSAndroid Build Coastguard Worker	$(E) "	PS2PDF $@"
86*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(PS2PDF) com_err.ps
87*6a54128fSAndroid Build Coastguard Worker
88*6a54128fSAndroid Build Coastguard Workercom_err.html: $(srcdir)/com_err.texinfo
89*6a54128fSAndroid Build Coastguard Worker	$(E) "	MAKEINFO $@"
90*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(HTML) $(srcdir)/com_err.texinfo
91*6a54128fSAndroid Build Coastguard Worker
92*6a54128fSAndroid Build Coastguard Workercom_err.pc: $(srcdir)/com_err.pc.in $(top_builddir)/config.status
93*6a54128fSAndroid Build Coastguard Worker	$(E) "	CONFIG.STATUS $@"
94*6a54128fSAndroid Build Coastguard Worker	$(Q) cd $(top_builddir); CONFIG_FILES=lib/et/com_err.pc ./config.status
95*6a54128fSAndroid Build Coastguard Worker
96*6a54128fSAndroid Build Coastguard Worker#libcom_err.o:	$(LIBOBJS)
97*6a54128fSAndroid Build Coastguard Worker#	$(LD) -r -s -o libcom_err.o $(LIBOBJS)
98*6a54128fSAndroid Build Coastguard Worker#	chmod -x libcom_err.o
99*6a54128fSAndroid Build Coastguard Worker
100*6a54128fSAndroid Build Coastguard WorkerTAGS:	$(SRCS)
101*6a54128fSAndroid Build Coastguard Worker	$(TAGS) $(SRCS)
102*6a54128fSAndroid Build Coastguard Worker
103*6a54128fSAndroid Build Coastguard Workerinstalldirs::
104*6a54128fSAndroid Build Coastguard Worker	$(E) "	MKDIR_P $(libdir) $(includedir)/et $(datadir)/et $(bindir) $(man1dir) $(man3dir)"
105*6a54128fSAndroid Build Coastguard Worker	$(Q) $(MKDIR_P) $(DESTDIR)$(libdir) \
106*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et \
107*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) \
108*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(man3dir) $(DESTDIR)$(pkgconfigdir)
109*6a54128fSAndroid Build Coastguard Worker
110*6a54128fSAndroid Build Coastguard Workerinstall:: compile_et libcom_err.a $(HFILES) installdirs com_err.pc
111*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(libdir)/libcom_err.a"
112*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) libcom_err.a $(DESTDIR)$(libdir)/libcom_err.a
113*6a54128fSAndroid Build Coastguard Worker	-$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libcom_err.a
114*6a54128fSAndroid Build Coastguard Worker	$(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libcom_err.a
115*6a54128fSAndroid Build Coastguard Worker	$(Q) for i in $(HFILES); do \
116*6a54128fSAndroid Build Coastguard Worker		echo "	INSTALL_DATA $(includedir)/et/$$i"; \
117*6a54128fSAndroid Build Coastguard Worker		$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/et/$$i; \
118*6a54128fSAndroid Build Coastguard Worker	done
119*6a54128fSAndroid Build Coastguard Worker	$(Q) (cd $(DESTDIR)$(includedir) ;\
120*6a54128fSAndroid Build Coastguard Worker		$(LN) $(LINK_INSTALL_FLAGS) et/com_err.h . )
121*6a54128fSAndroid Build Coastguard Worker	$(Q) for i in $(SHARE_FILES); do \
122*6a54128fSAndroid Build Coastguard Worker		echo "	INSTALL_DATA $(datadir)/et/$$i"; \
123*6a54128fSAndroid Build Coastguard Worker		$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/et/$$i; \
124*6a54128fSAndroid Build Coastguard Worker	done
125*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_SCRIPT $(bindir)/compile_et"
126*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_SCRIPT) compile_et $(DESTDIR)$(bindir)/compile_et
127*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(man3dir)/com_err.3"
128*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) $(srcdir)/com_err.3 $(DESTDIR)$(man3dir)/com_err.3
129*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(man1dir)/compile_et.1"
130*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) $(srcdir)/compile_et.1 \
131*6a54128fSAndroid Build Coastguard Worker			$(DESTDIR)$(man1dir)/compile_et.1
132*6a54128fSAndroid Build Coastguard Worker	$(E) "	INSTALL_DATA $(pkgconfigdir)/com_err.pc"
133*6a54128fSAndroid Build Coastguard Worker	$(Q) $(INSTALL_DATA) com_err.pc $(DESTDIR)$(pkgconfigdir)/com_err.pc
134*6a54128fSAndroid Build Coastguard Worker
135*6a54128fSAndroid Build Coastguard Workeruninstall::
136*6a54128fSAndroid Build Coastguard Worker	$(RM) -f $(DESTDIR)$(libdir)/libcom_err.a \
137*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(bindir)/compile_et \
138*6a54128fSAndroid Build Coastguard Worker		$(DESTDIR)$(pkgconfigdir)/com_err.pc
139*6a54128fSAndroid Build Coastguard Worker	$(RM) -rf $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et
140*6a54128fSAndroid Build Coastguard Worker
141*6a54128fSAndroid Build Coastguard Workerfullcheck check:: compile_et
142*6a54128fSAndroid Build Coastguard Worker	for i in $(srcdir)/test_cases/*.et ; do \
143*6a54128fSAndroid Build Coastguard Worker		t=`basename $$i | sed -e 's/.et//'`; \
144*6a54128fSAndroid Build Coastguard Worker		_ET_DIR_OVERRIDE=$(srcdir) ./compile_et $$i ; \
145*6a54128fSAndroid Build Coastguard Worker		diff -c $(srcdir)/test_cases/$$t.c $$t.c > $$t.failed; \
146*6a54128fSAndroid Build Coastguard Worker		if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
147*6a54128fSAndroid Build Coastguard Worker		diff -c $(srcdir)/test_cases/$$t.h $$t.h >> $$t.failed; \
148*6a54128fSAndroid Build Coastguard Worker		if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
149*6a54128fSAndroid Build Coastguard Worker		$(RM) -f $$t.c $$t.h $$t.failed; \
150*6a54128fSAndroid Build Coastguard Worker		echo "Test case $$t succeeded" ; \
151*6a54128fSAndroid Build Coastguard Worker	done
152*6a54128fSAndroid Build Coastguard Worker
153*6a54128fSAndroid Build Coastguard Workerclean::
154*6a54128fSAndroid Build Coastguard Worker	$(RM) -f compile_et libcom_err.a libcom_err_p.a com_err.info
155*6a54128fSAndroid Build Coastguard Worker	$(RM) -f $(OBJS) profiled/*
156*6a54128fSAndroid Build Coastguard Worker	$(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.ps TAGS *.ln \
157*6a54128fSAndroid Build Coastguard Worker		*.html *.cp *.fn *.fns *.ky *.log *.pc *.pg *.toc *.tp *.vr \
158*6a54128fSAndroid Build Coastguard Worker		*.pdf
159*6a54128fSAndroid Build Coastguard Worker	$(RM) -f ../libcom_err.a ../libcom_err_p.a
160*6a54128fSAndroid Build Coastguard Worker
161*6a54128fSAndroid Build Coastguard Workermostlyclean:: clean
162*6a54128fSAndroid Build Coastguard Workerdistclean:: clean
163*6a54128fSAndroid Build Coastguard Worker	$(RM) -f .depend Makefile com_err.pc \
164*6a54128fSAndroid Build Coastguard Worker		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
165*6a54128fSAndroid Build Coastguard Worker
166*6a54128fSAndroid Build Coastguard Worker$(OBJS): subdirs
167*6a54128fSAndroid Build Coastguard Worker
168*6a54128fSAndroid Build Coastguard Worker# +++ Dependency line eater +++
169*6a54128fSAndroid Build Coastguard Worker#
170*6a54128fSAndroid Build Coastguard Worker# Makefile dependencies follow.  This must be the last section in
171*6a54128fSAndroid Build Coastguard Worker# the Makefile.in file
172*6a54128fSAndroid Build Coastguard Worker#
173*6a54128fSAndroid Build Coastguard Workererror_message.o: $(srcdir)/error_message.c $(top_builddir)/lib/config.h \
174*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
175*6a54128fSAndroid Build Coastguard Worker $(srcdir)/internal.h
176*6a54128fSAndroid Build Coastguard Workeret_name.o: $(srcdir)/et_name.c $(top_builddir)/lib/config.h \
177*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
178*6a54128fSAndroid Build Coastguard Worker $(srcdir)/internal.h
179*6a54128fSAndroid Build Coastguard Workerinit_et.o: $(srcdir)/init_et.c $(top_builddir)/lib/config.h \
180*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h
181*6a54128fSAndroid Build Coastguard Workercom_err.o: $(srcdir)/com_err.c $(top_builddir)/lib/config.h \
182*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h \
183*6a54128fSAndroid Build Coastguard Worker $(srcdir)/internal.h
184*6a54128fSAndroid Build Coastguard Workercom_right.o: $(srcdir)/com_right.c $(top_builddir)/lib/config.h \
185*6a54128fSAndroid Build Coastguard Worker $(top_builddir)/lib/dirpaths.h $(srcdir)/com_err.h $(srcdir)/error_table.h
186