Add stub rpmtypes.h header stub
[platform/upstream/rpm.git] / Makefile.am
1 # Top level Makefile for rpm
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 DISTCHECK_CONFIGURE_FLAGS = --with-external-db
6
7 include $(top_srcdir)/rpm.am
8
9 CLEANFILES =
10 EXTRA_DIST = CHANGES ChangeLog CREDITS GROUPS INSTALL \
11         autodeps autogen.sh \
12         db3/configure installplatform platform.in
13 BUILT_SOURCES =
14
15 SUBDIRS = po misc
16 if WITH_INTERNAL_DB
17 SUBDIRS += db3
18 endif
19 SUBDIRS += lua rpmio rpmdb lib build python scripts doc . tests
20
21 DIST_SUBDIRS = po misc lua rpmio rpmdb lib build python scripts doc tests
22
23 pkgconfigdir = $(libdir)/pkgconfig
24
25 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
26 AM_CPPFLAGS += -I$(top_srcdir)/build
27 AM_CPPFLAGS += -I$(top_srcdir)/lib
28 AM_CPPFLAGS += -I$(top_builddir)/rpmdb -I$(top_srcdir)/rpmdb
29 AM_CPPFLAGS += -I$(top_srcdir)/rpmio
30 AM_CPPFLAGS += @WITH_NSS_INCLUDE@
31 AM_CPPFLAGS += @WITH_POPT_INCLUDE@
32 AM_CPPFLAGS += -I$(top_srcdir)/misc
33 AM_CPPFLAGS += @WITH_LIBELF_INCLUDE@
34 AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\""
35 AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\""
36 AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"@RPMCONFIGDIR@/rpmpopt-${VERSION}\""
37
38 staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@
39
40 pkginclude_HEADERS =
41 nodist_pkginclude_HEADERS =
42
43 pkginclude_HEADERS += rpmio/argv.h
44 pkginclude_HEADERS += rpmio/rpmio.h
45 pkginclude_HEADERS += rpmio/rpmurl.h
46 pkginclude_HEADERS += rpmio/rpmmacro.h
47 pkginclude_HEADERS += rpmio/rpmlog.h
48 pkginclude_HEADERS += rpmio/rpmpgp.h
49 pkginclude_HEADERS += rpmio/rpmsq.h
50 pkginclude_HEADERS += rpmio/rpmstring.h
51 pkginclude_HEADERS += rpmio/rpmsw.h
52 pkginclude_HEADERS += rpmio/rpmfileutil.h
53
54 pkginclude_HEADERS += rpmdb/header.h
55 pkginclude_HEADERS += rpmdb/rpmdb.h
56 nodist_pkginclude_HEADERS += rpmdb/rpmints.h
57
58 pkginclude_HEADERS += lib/idtx.h
59 pkginclude_HEADERS += lib/rpmcallback.h
60 pkginclude_HEADERS += lib/rpmcli.h
61 pkginclude_HEADERS += lib/rpmlib.h
62 pkginclude_HEADERS += lib/rpmal.h
63 pkginclude_HEADERS += lib/rpmds.h
64 pkginclude_HEADERS += lib/rpmfi.h
65 pkginclude_HEADERS += lib/rpmgi.h
66 pkginclude_HEADERS += lib/rpmps.h
67 pkginclude_HEADERS += lib/rpmtag.h
68 pkginclude_HEADERS += lib/rpmte.h
69 pkginclude_HEADERS += lib/rpmts.h
70 pkginclude_HEADERS += lib/rpmtypes.h
71
72 pkginclude_HEADERS += build/rpmbuild.h
73 pkginclude_HEADERS += build/rpmfc.h
74 pkginclude_HEADERS += build/rpmspec.h
75
76
77 rpmbindir = `echo $(bindir) | $(SED) -e s,usr/bin,bin,`
78 rpmbin_PROGRAMS = rpm
79
80 bin_PROGRAMS =          rpm2cpio
81
82 rpmlibexec_PROGRAMS =   rpmb rpmd rpmi rpmk rpmq
83 rpmconfig_SCRIPTS =     find-provides find-requires mkinstalldirs \
84                         config.guess config.sub
85 DISTCLEANFILES = find-provides
86 DISTCLEANFILES += find-requires
87
88 rpm_SOURCES =           rpmqv.c debug.h system.h
89 rpm_CPPFLAGS =          $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV
90 rpm_LDADD =             build/librpmbuild.la lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
91 rpm_LDADD +=            @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
92
93 rpmb_SOURCES =          build.c rpmqv.c build.h debug.h system.h
94 rpmb_CPPFLAGS =         $(AM_CPPFLAGS) -DIAM_RPMBT
95 rpmb_LDADD =            build/librpmbuild.la lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
96 rpmb_LDADD +=           @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
97
98 rpmd_SOURCES =          rpmqv.c debug.h system.h
99 rpmd_CPPFLAGS =         $(AM_CPPFLAGS) -DIAM_RPMDB
100 rpmd_LDADD =            lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
101 rpmd_LDADD +=           @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
102
103 rpmi_SOURCES =          rpmqv.c debug.h system.h
104 rpmi_CPPFLAGS =         $(AM_CPPFLAGS) -DIAM_RPMEIU
105 rpmi_LDADD =            lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
106 rpmi_LDADD +=           @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
107
108 rpmk_SOURCES =          rpmqv.c debug.h system.h
109 rpmk_CPPFLAGS =         $(AM_CPPFLAGS) -DIAM_RPMK
110 rpmk_LDADD =            lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
111 rpmk_LDADD +=           @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
112
113 rpmq_SOURCES =          rpmqv.c debug.h system.h
114 rpmq_CPPFLAGS =         $(AM_CPPFLAGS) -DIAM_RPMQV
115 rpmq_LDADD =            build/librpmbuild.la lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
116 rpmq_LDADD +=           @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
117
118 rpm2cpio_SOURCES =      rpm2cpio.c debug.h system.h
119 rpm2cpio_LDADD =        lib/librpm.la rpmdb/librpmdb.la rpmio/librpmio.la
120 rpm2cpio_LDADD +=       @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@
121
122
123 if LIBELF
124 if LIBDWARF
125 rpmconfig_SCRIPTS += scripts/find-debuginfo.sh
126
127 rpmlibexec_PROGRAMS +=  debugedit
128 debugedit_SOURCES =     tools/debugedit.c tools/hashtab.c tools/hashtab.h
129 debugedit_LDADD =       rpmio/librpmio.la
130 debugedit_LDADD +=      @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
131 endif
132 endif
133
134 rpmlibexec_PROGRAMS +=  javadeps
135 javadeps_SOURCES =      tools/javadeps.c
136 javadeps_LDADD =
137
138 rpmlibexec_PROGRAMS +=  rpmcache
139 rpmcache_SOURCES =      tools/rpmcache.c
140 rpmcache_LDADD =        lib/librpm.la
141
142 rpmlibexec_PROGRAMS +=  rpmdeps
143 rpmdeps_SOURCES =       tools/rpmdeps.c
144 rpmdeps_LDADD =         build/librpmbuild.la
145
146 bin_PROGRAMS +=         rpmgraph
147 rpmgraph_SOURCES =      tools/rpmgraph.c
148 rpmgraph_LDADD =        lib/librpm.la
149
150 dist_bin_SCRIPTS =      scripts/gendiff
151
152 check_PROGRAMS =        dumpdb
153 dumpdb_SOURCES =        tools/dumpdb.c
154 dumpdb_LDADD =          lib/librpm.la
155
156 check_PROGRAMS +=       convertdb1
157 convertdb1_SOURCES =    tools/convertdb1.c
158 convertdb1_LDADD =      lib/librpm.la
159
160 check_PROGRAMS +=       rpminject
161 rpminject_SOURCES =     tools/rpminject.c
162 rpminject_LDADD =       build/librpmbuild.la
163
164 check_PROGRAMS +=       rpmsort
165 rpmsort_SOURCES =       tools/rpmsort.c
166 rpmsort_LDADD =         lib/librpm.la
167
168 rpmconfig_DATA = rpmrc
169 rpmrc: $(top_srcdir)/rpmrc.in
170         @$(SED) \
171           -e "s,[@]SYSCONFIGDIR[@],$(sysconfdir)/rpm,g" \
172           < $(top_srcdir)/rpmrc.in > rpmrc.tmp \
173           && ( cd $(top_builddir) && ./config.status --file=${subdir}/rpmrc:${subdir}/rpmrc.tmp )
174 CLEANFILES += rpmrc.tmp rpmrc
175 EXTRA_DIST += rpmrc.in
176
177 rpmconfig_DATA += macros
178 macros: $(top_srcdir)/macros.in
179         @$(SED) \
180           -e "s,[@]varprefix[@],$(localstatedir),g" \
181           < $(top_srcdir)/macros.in > macros.tmp \
182           && ( cd $(top_builddir) && ./config.status --file=${subdir}/macros:${subdir}/macros.tmp )
183 CLEANFILES += macros.tmp macros
184 EXTRA_DIST += macros.in
185
186 noinst_DATA = platform
187 platform: $(top_srcdir)/platform.in
188         @$(SED) \
189           -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
190           < $(top_srcdir)/platform.in > platform.tmp \
191           && ( cd $(top_builddir) && ./config.status --file=${subdir}/platform:${subdir}/platform.tmp )
192 CLEANFILES += platform.tmp platform
193 EXTRA_DIST += platform.in
194
195 pkgconfig_DATA = rpm.pc
196 rpm.pc: $(top_srcdir)/rpm.pc.in
197         @$(SED) \
198           -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
199           < $(top_srcdir)/rpm.pc.in > rpm.pc.tmp \
200           && ( cd $(top_builddir) && ./config.status --file=${subdir}/rpm.pc:${subdir}/rpm.pc.tmp )
201 CLEANFILES += rpm.pc.tmp rpm.pc
202 EXTRA_DIST += rpm.pc.in
203
204 rpmconfig_DATA += rpmpopt-$(VERSION)
205 rpmpopt-@VERSION@: $(top_srcdir)/rpmpopt.in
206         @$(SED) \
207           -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir),g" \
208           < $(top_srcdir)/rpmpopt.in > rpmpopt-@VERSION@.tmp \
209           && ( cd $(top_builddir) && ./config.status --file=${subdir}/rpmpopt-@VERSION@:${subdir}/rpmpopt-@VERSION@.tmp )
210 CLEANFILES += rpmpopt-@VERSION@.tmp rpmpopt-@VERSION@
211 EXTRA_DIST += rpmpopt.in
212
213 usrsrcdir = $(prefix)/src
214
215 pkgsrcdir = $(usrsrcdir)/packages
216 pkgsrc_RPMSdir = $(pkgsrcdir)/RPMS
217 pkgsrc_RPMS_DATA =
218 pkgsrc_SRPMSdir = $(pkgsrcdir)/SRPMS
219 pkgsrc_SRPMS_DATA =
220 pkgsrc_SPECSdir = $(pkgsrcdir)/SPECS
221 pkgsrc_SPECS_DATA =
222 pkgsrc_SOURCESdir = $(pkgsrcdir)/SOURCES
223 pkgsrc_SOURCES_DATA =
224 pkgsrc_BUILDdir = $(pkgsrcdir)/BUILD
225 pkgsrc_BUILD_DATA =
226
227 rpmvardir = $(localstatedir)/lib/rpm
228 rpmvar_DATA =
229
230 install-exec-hook:
231         @rm -f $(DESTDIR)$(rpmlibexecdir)/rpmt
232         @@LN_S@ rpmb $(DESTDIR)$(rpmlibexecdir)/rpmt
233         @rm -f $(DESTDIR)$(rpmlibexecdir)/rpme
234         @@LN_S@ rpmi $(DESTDIR)$(rpmlibexecdir)/rpme
235         @rm -f $(DESTDIR)$(rpmlibexecdir)/rpmu
236         @@LN_S@ rpmi $(DESTDIR)$(rpmlibexecdir)/rpmu
237         @rm -f $(DESTDIR)$(rpmlibexecdir)/rpmv
238         @@LN_S@ rpmq $(DESTDIR)$(rpmlibexecdir)/rpmv
239         rm -f $(DESTDIR)$(bindir)/rpmbuild
240         @LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild
241         rm -f $(DESTDIR)$(bindir)/rpmquery
242         @LN_S@ ../lib/rpm/rpmq $(DESTDIR)$(bindir)/rpmquery
243         rm -f $(DESTDIR)$(bindir)/rpmverify
244         @LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify
245         rm -f $(DESTDIR)$(bindir)/rpmsign
246         @LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign
247         rm -f $(DESTDIR)$(bindir)/rpmdb ; \
248         @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \
249         for bf in e i u ; do \
250             rm -f $(DESTDIR)$(bindir)/rpm$$bf ; \
251             @LN_S@ ../lib/rpm/rpm$$bf $(DESTDIR)$(bindir)/rpm$$bf ; \
252         done
253
254 install-data-local:
255         @case "@host_cpu@" in \
256         *86)    $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i386 ;\
257                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\
258                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\
259                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\
260                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\
261                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/geode ;;\
262         alpha*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
263                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
264         arm*)   $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
265                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;\
266                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4tl ;\
267                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tel ;\
268                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tejl ;\
269                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv6l ;;\
270         sparc*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
271                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
272                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
273                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9v ;\
274                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;\
275                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64v ;;\
276         ia64*)  $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
277         s390*)  $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
278         mipsel*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/mipsel ;;\
279         mips*)  $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/mips ;;\
280         powerpc*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc ;\
281                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppciseries ;\
282                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppcpseries ;\
283                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64 ;\
284                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64iseries ;\
285                 $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64pseries ;;\
286         *)      $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\
287         esac
288         $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
289         @case "@host_os@" in \
290         mint) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/m68kmint ;;\
291         solaris*|linux*|darwin*) \
292            DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" $(SHELL) $(top_srcdir)/installplatform rpmrc macros platform ;; \
293         esac
294         @$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp
295
296 # XXX to appease distcheck we need to remove "stuff" here...
297 uninstall-local:
298         @rm -rf $(DESTDIR)/$(rpmconfigdir)/*-*
299         rm -f $(DESTDIR)$(rpmlibexecdir)/rpmu
300         rm -f $(DESTDIR)$(rpmlibexecdir)/rpme
301         rm -f $(DESTDIR)$(rpmlibexecdir)/rpmt
302         rm -f $(DESTDIR)$(rpmlibexecdir)/rpmv
303         rm -f $(DESTDIR)$(bindir)/rpmquery
304         rm -f $(DESTDIR)$(bindir)/rpmbuild
305         rm -f $(DESTDIR)$(bindir)/rpmu
306         rm -f $(DESTDIR)$(bindir)/rpmsign
307         rm -f $(DESTDIR)$(bindir)/rpme
308         rm -f $(DESTDIR)$(bindir)/rpmverify
309         rm -f $(DESTDIR)$(bindir)/rpmdb
310         rm -f $(DESTDIR)$(bindir)/rpmi
311
312 MAINTAINERCLEANFILES = ChangeLog
313
314 .PHONY: setperms
315 setperms:
316         @for f in $(rpmbin_PROGRAMS) ; do\
317             $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(rpmbindir)/$$f ;\
318             $(__CHMOD) g+s $(DESTDIR)$(rpmbindir)/$$f ;\
319         done
320         @for f in $(bin_PROGRAMS) ; do\
321             $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(bindir)/$$f ;\
322         done
323         @for f in $(rpmlibexec_PROGRAMS) ; do\
324             $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(rpmlibexecdir)/$$f ;\
325             $(__CHMOD) g+s $(DESTDIR)$(rpmlibexecdir)/$$f ;\
326         done
327         @for f in $(pkglib_SCRIPTS) ; do\
328             $(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)/$$f ;\
329         done
330         @$(__CHOWN) ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(pkglibdir)
331         @$(__CHOWN) -R ${RPMUSER}.${RPMGROUP} $(DESTDIR)$(rpmvardir)
332         -@$(__CHMOD) 0664 $(DESTDIR)$(rpmvardir)/[A-Z]*
333         -@$(__CHMOD) 0775 $(DESTDIR)$(rpmvardir)
334         -@$(__CHMOD) 0664 $(DESTDIR)$(rpmvardir)/__db.*
335
336 .PHONY: unsetgid
337 unsetgid:
338         @for f in $(rpmbin_PROGRAMS) ; do\
339             $(__CHMOD) g-s $(DESTDIR)$(rpmbindir)/$$f ;\
340         done
341         @for f in $(rpmlibexec_PROGRAMS) ; do\
342             $(__CHMOD) g-s $(DESTDIR)$(rpmlibexecdir)/$$f ;\
343         done
344
345 # Build hacking docs only on request
346 if HACKINGDOCS
347 if DOXYGEN
348 doc/hacking.doxy: doc/hacking.doxy.in doc/hacking/Doxyheader Makefile.am
349         $(SED) \
350           -e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
351           -e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
352           -e "s,[@]PACKAGE[@],$(PACKAGE)," \
353           -e "s,[@]VERSION[@],$(VERSION)," \
354         < $(top_srcdir)/doc/hacking.doxy.in > doc/hacking.doxy
355
356 doc/hacking/html/index.html: doc/hacking.doxy rpmpopt-@VERSION@
357         @DOXYGEN@ doc/hacking.doxy
358 noinst_DATA += doc/hacking/html/index.html
359 endif
360 endif
361 EXTRA_DIST += doc/hacking.doxy.in doc/hacking/Doxyheader
362
363 # Always build librpm docs
364 if DOXYGEN
365 doc/librpm.doxy: doc/librpm.doxy.in doc/librpm/Doxyheader Makefile.am $(pkginclude_HEADERS)
366         files=`echo " $(HEADERS)" | $(SED) -e "s, , \@top_srcdir\@/,g"`; \
367         $(SED) -e "s,[@]pkginclude_HEADERS[@],$$files," \
368           -e "s,\@top_srcdir\@/,$(top_srcdir)/,g" \
369           -e "s,[@]HAVE_DOT[@],$(HAVE_DOT)," \
370           -e "s,[@]PACKAGE[@],$(PACKAGE)," \
371           -e "s,[@]VERSION[@],$(VERSION)," \
372         < $(top_srcdir)/doc/librpm.doxy.in > doc/librpm.doxy
373
374 doc/librpm/html/index.html: doc/librpm.doxy
375         @DOXYGEN@ doc/librpm.doxy
376 noinst_DATA += doc/librpm/html/index.html
377 endif
378 EXTRA_DIST += doc/librpm.doxy.in doc/librpm/Doxyheader
379 EXTRA_DIST += doc/librpm/html
380
381 if WITH_INTERNAL_DB
382 db.h:   $(top_builddir)/db3/db.h
383         $(LN_S) $(top_builddir)/db3/db.h $@
384 BUILT_SOURCES += db.h
385 endif
386 DISTCLEANFILES += db.h
387
388 clean-local:
389         rm -rf doc/hacking/html
390         rm -rf include
391
392 distclean-local:
393         rm -rf Doxytags
394         rm -f stamp-h.in db3/*.orig db3/db3lobjs
395
396 maintainer-clean-local:
397         rm -rf doc/librpm/html
398
399 $(top_srcdir)/preinstall.am: Makefile.am
400         rm -f $(top_srcdir)/preinstall.am
401         @for f in $(HEADERS); do \
402           b=`basename $$f`; \
403           echo 'include/rpm/'$$b': '$$f' include/rpm/$$(dirstamp)' >> $(top_srcdir)/preinstall.am;\
404           echo '        $$(INSTALL_DATA) $$(top_srcdir)/'$$f' include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \
405           echo 'BUILT_SOURCES += include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \
406           echo 'CLEANFILES += include/rpm/'$$b  >> $(top_srcdir)/preinstall.am; \
407          done
408
409 include/rpm/$(dirstamp):
410         @$(MKDIR_P) include/rpm
411         @: > include/rpm/$(dirstamp)
412
413 include $(top_srcdir)/preinstall.am