From: Ralf Corsépius Date: Thu, 22 Nov 2007 14:54:42 +0000 (+0100) Subject: Add header preinstallation. X-Git-Tag: rpm-4.6.0-rc1~1442 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=583140460100ea99553d883174065ca22a3099b2;p=platform%2Fupstream%2Frpm.git Add header preinstallation. --- diff --git a/Makefile.am b/Makefile.am index 46e22cb..779b42d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,8 @@ include $(top_srcdir)/rpm.am CLEANFILES = EXTRA_DIST = CHANGES ChangeLog CREDITS GROUPS INSTALL \ autodeps autogen.sh \ - db db3/configure installplatform platform* + db db3/configure installplatform platform* +BUILT_SOURCES = SUBDIRS = po misc if WITH_INTERNAL_DB @@ -374,12 +375,13 @@ EXTRA_DIST += doc/librpm/html if WITH_INTERNAL_DB db.h: $(top_builddir)/db3/db.h $(LN_S) $(top_builddir)/db3/db.h $@ -BUILT_SOURCES = db.h +BUILT_SOURCES += db.h endif DISTCLEANFILES += db.h clean-local: rm -rf doc/hacking/html + rm -rf include distclean-local: rm -rf Doxytags @@ -388,3 +390,18 @@ distclean-local: maintainer-clean-local: rm -rf doc/librpm/html +$(top_srcdir)/preinstall.am: Makefile.am + rm -f preinstall.am + @for f in $(HEADERS); do \ + b=`basename $$f`; \ + echo 'include/rpm/'$$b': '$$f include/rpm/$(dirstamp) >> $(top_srcdir)/preinstall.am;\ + echo ' $$(INSTALL_DATA) '$$f' include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \ + echo 'BUILT_SOURCES += include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \ + echo 'CLEANFILES += include/rpm/'$$b >> $(top_srcdir)/preinstall.am; \ + done + +include/rpm/$(dirstamp): + @$(MKDIR_P) include/rpm + @: > include/rpm/$(dirstamp) + +include $(top_srcdir)/preinstall.am diff --git a/configure.ac b/configure.ac index 313f322..73a261c 100644 --- a/configure.ac +++ b/configure.ac @@ -1060,6 +1060,8 @@ AS_IF([test "$ac_cv_header_stdint_h" = "yes"],[ AC_DEFINE([__RPM_USES_STDINT_H__],[1],[if rpm uses stdint.h]) ]) +AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp]) + AC_CONFIG_HEADERS([rpmdb/rpmints.h]) AC_CONFIG_FILES([Makefile diff --git a/preinstall.am b/preinstall.am new file mode 100644 index 0000000..e69de29