Makefile.am 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ## Process this file with automake to produce a Makefile.in
  2. AUTOMAKE_OPTIONS = 1.1 foreign
  3. ## Directory definitions
  4. pkgincludedir = $(includedir)/@PACKAGE@
  5. pkglocalstatedir = $(localstatedir)/@PACKAGE@
  6. pkgsysconfdir = $(sysconfdir)/@PACKAGE@
  7. methods_suffix = methods
  8. pinfo_suffix = info
  9. pupdates_suffix = updates
  10. parts_suffix = parts
  11. ## Automake variables
  12. pkginclude_HEADERS = dpkg.h dpkg-db.h tarfn.h
  13. noinst_HEADERS = myopt.h
  14. EXTRA_DIST = dpkg.h.in
  15. BUILT_SOURCES = # dpkg.h
  16. CLEANFILES = dpkg.h dpkg.h.new $(BUILT_SOURCES)
  17. MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
  18. ## Rules
  19. .PHONY: install-data-local uninstall-local
  20. install-data-local:
  21. $(mkinstalldirs) $(pkglocalstatedir)/{$(pinfo_suffix),$(pupdates_suffix)}
  22. uninstall-local:
  23. -for d in $(pkglocalstatedir)/{$(pinfo_suffix),$(pupdates_suffix)} \
  24. $(pkgincludedir) $(pkglocalstatedir) $(pkglocalstatedir); do \
  25. [ -e $$d ] && rmdir $$d; \
  26. done
  27. dpkg.h: stamp-dpkg.h
  28. stamp-dpkg.h: dpkg.h.in Makefile
  29. sed 's:^\(#define ADMINDIR[ ]*"\).*\(".*\):\1$(pkglocalstatedir)\2:; \
  30. s:^\(#define UPDATESDIR[ ]*"\).*\(".*\):\1$(pupdates_suffix)/\2:; \
  31. s:^\(#define INFODIR[ ]*"\).*\(".*\):\1$(pinfo_suffix)/\2:; \
  32. s:^\(#define PARTSDIR[ ]*"\).*\(".*\):\1$(parts_suffix)/\2:; \
  33. s:^\(#define LIBDIR[ ]*"\).*\(".*\):\1$(pkglibdir)/\2:; \
  34. s:^\(#define METHODSDIR[ ]*"\).*\(".*\):\1$(methods_suffix)\2:' \
  35. < $< > dpkg.h.new
  36. (cmp -s dpkg.h.new dpkg.h) || mv -f dpkg.h.new dpkg.h
  37. touch $@
  38. ## End of file.