Makefile.in 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
  2. # Copyright (C) 1994,1995 Ian Jackson <iwj10@cus.cam.ac.uk>
  3. #
  4. # This is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as
  6. # published by the Free Software Foundation; either version 2,
  7. # or (at your option) any later version.
  8. #
  9. # This is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public
  15. # License along with dpkg; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. srcdir = @srcdir@
  18. VPATH = @srcdir@
  19. prefix = @prefix@
  20. exec_prefix = $(prefix)
  21. docdir = $(prefix)/doc
  22. devdocdir = $(docdir)/dpkg
  23. copyingfile = $(docdir)/copyright/dpkg
  24. infodir = $(prefix)/info
  25. bindir = $(exec_prefix)/bin
  26. sbindir = $(exec_prefix)/sbin
  27. libdir = $(prefix)/lib
  28. dpkglibdir = $(libdir)/dpkg
  29. methodsdir = $(dpkglibdir)/methods
  30. datadir = /var/lib/dpkg
  31. methodsdatadir = $(datadir)/methods
  32. methodsmnt = $(datadir)/methods/mnt
  33. pinfodir = $(datadir)/info
  34. pupdatesdir = $(datadir)/updates
  35. altsdatadir = $(datadir)/alternatives
  36. partsdir = $(datadir)/parts
  37. mandir = $(prefix)/man
  38. man1dir = $(mandir)/man1
  39. man5dir = $(mandir)/man5
  40. man8dir = $(mandir)/man8
  41. man1 = 1
  42. man5 = 5
  43. man8 = 8
  44. etcdir= /etc
  45. altsetcdir = $(etcdir)/alternatives
  46. BOURNESHELL = /bin/sh
  47. INSTALL = @INSTALL@
  48. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  49. INSTALL_DATA = @INSTALL_DATA@
  50. CC = @CC@
  51. CFLAGS = @CFLAGS@ @CWARNS@ $(XCFLAGS)
  52. LDFLAGS = $(XLDFLAGS)
  53. ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS)
  54. SUBDIRS = lib main dpkg-deb split md5sum scripts doc include dselect methods
  55. PORTABLEDIRS = lib dpkg-deb split md5sum
  56. .SUFFIXES: .c .o
  57. .c.o:
  58. $(CC) $(ALL_CFLAGS) -c $<
  59. all: version
  60. set -e; for d in $(SUBDIRS) ; do \
  61. cd $$d ; \
  62. $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)'; \
  63. cd .. ; \
  64. done
  65. install: all
  66. $(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) $(sbindir) \
  67. $(man1dir) $(man5dir) $(man8dir) $(devdocdir) \
  68. $(libdir) $(datadir) $(pinfodir) $(pupdatesdir) \
  69. $(dpkglibdir) $(methodsdir) $(methodsdatadir) $(methodsmnt) \
  70. $(altsdatadir) $(altsetcdir) $(partsdir) $(infodir)
  71. set -e; for d in $(SUBDIRS) ; do \
  72. cd $$d ; \
  73. $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \
  74. install ; \
  75. cd .. ; \
  76. done
  77. $(INSTALL_DATA) COPYING $(copyingfile)
  78. portable: version
  79. set -e; for d in lib dpkg-deb split md5sum ; do \
  80. cd $$d ; \
  81. $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' ; \
  82. cd .. ; \
  83. done
  84. install-portable: portable
  85. $(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) \
  86. $(man1dir) $(man8dir) $(libdir) $(dpkglibdir)
  87. set -e; for d in $(PORTABLEDIRS) ; do \
  88. cd $$d ; \
  89. $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \
  90. install ; \
  91. cd .. ; \
  92. done
  93. # $(INSTALL_DATA) COPYING $(copyingfile)
  94. autoconf:
  95. autoheader
  96. autoconf
  97. clean:
  98. set -e; for d in $(SUBDIRS) ; do \
  99. cd $$d ; \
  100. $(MAKE) clean ; \
  101. cd .. ; \
  102. done
  103. rm -f core version.h.new
  104. distclean: clean
  105. set -e; for d in $(SUBDIRS) ; do \
  106. cd $$d ; \
  107. $(MAKE) distclean ; \
  108. cd .. ; \
  109. done
  110. rm -f Makefile *.orig *~ *.~* ./#*#
  111. rm -f config.h config.status install config.cache config.log
  112. version:
  113. perl insert-version.pl <version.h >version.h.new
  114. cmp -s version.h.new version.h || mv version.h.new version.h