Makefile.am 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. # Makefile for GNU tar library.
  2. # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004
  3. # Free Software Foundation, Inc.
  4. ## This program is free software; you can redistribute it and/or modify
  5. ## it under the terms of the GNU General Public License as published by
  6. ## the Free Software Foundation; either version 2, or (at your option)
  7. ## any later version.
  8. ## This program is distributed in the hope that it will be useful,
  9. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ## GNU General Public License for more details.
  12. ## You should have received a copy of the GNU General Public License
  13. ## along with this program; if not, write to the Free Software
  14. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. ## 02111-1307, USA.
  16. noinst_LIBRARIES = libtar.a
  17. libtar_a_SOURCES = prepargs.c prepargs.h
  18. libtar_a_LIBADD = $(LIBOBJS) $(ALLOCA)
  19. libtar_a_DEPENDENCIES = $(libtar_a_LIBADD)
  20. BUILT_SOURCES =
  21. EXTRA_DIST =
  22. MAINTAINERCLEANFILES =
  23. MOSTLYCLEANFILES =
  24. lib_OBJECTS = $(libtar_a_OBJECTS)
  25. # gnulib modules
  26. # alloca
  27. BUILT_SOURCES += $(ALLOCA_H)
  28. EXTRA_DIST += alloca_.h
  29. # We need the following in order to create an <alloca.h> when the system
  30. # doesn't have one that works with the given compiler.
  31. all-local $(lib_OBJECTS): $(ALLOCA_H)
  32. alloca.h: alloca_.h
  33. cp $(srcdir)/alloca_.h $@-t
  34. mv $@-t $@
  35. MOSTLYCLEANFILES += alloca.h alloca.h-t
  36. # argmatch
  37. libtar_a_SOURCES += argmatch.h argmatch.c
  38. # backupfile
  39. libtar_a_SOURCES += backupfile.h backupfile.c addext.c
  40. # dirname
  41. libtar_a_SOURCES += dirname.h dirname.c basename.c stripslash.c
  42. # exclude
  43. libtar_a_SOURCES += exclude.h exclude.c
  44. # exitfail
  45. libtar_a_SOURCES += exitfail.h exitfail.c
  46. # exit
  47. libtar_a_SOURCES += exit.h
  48. # fnmatch
  49. BUILT_SOURCES += $(FNMATCH_H)
  50. EXTRA_DIST += fnmatch_.h fnmatch_loop.c
  51. # stpcpy
  52. EXTRA_DIST += stpcpy.c stpcpy.h
  53. # We need the following in order to create an <fnmatch.h> when the system
  54. # doesn't have one that supports the required API.
  55. all-local $(lib_OBJECTS): $(FNMATCH_H)
  56. fnmatch.h: fnmatch_.h
  57. cp $(srcdir)/fnmatch_.h $@-t
  58. mv $@-t $@
  59. MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
  60. # full-write
  61. libtar_a_SOURCES += full-write.h full-write.c
  62. # getdate
  63. libtar_a_SOURCES += getdate.h getdate.y
  64. BUILT_SOURCES += getdate.c
  65. MAINTAINERCLEANFILES += getdate.c
  66. #
  67. # Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
  68. $(srcdir)/getdate.c: getdate.y
  69. cd $(srcdir) && \
  70. $(YACC) $(YFLAGS) getdate.y && \
  71. mv -f y.tab.c getdate.c
  72. # getline
  73. libtar_a_SOURCES += getline.h
  74. EXTRA_DIST += getndelim2.h getndelim2.c
  75. # getopt
  76. libtar_a_SOURCES += getopt.h getopt.c getopt1.c
  77. # gettext
  78. libtar_a_SOURCES += gettext.h
  79. # gettime
  80. libtar_a_SOURCES += gettime.c
  81. # hash
  82. libtar_a_SOURCES += hash.h hash.c
  83. # human
  84. libtar_a_SOURCES += human.h human.c
  85. # lchown
  86. libtar_a_SOURCES += lchown.h
  87. # modechange
  88. libtar_a_SOURCES += modechange.h modechange.c
  89. # pathmax
  90. libtar_a_SOURCES += pathmax.h
  91. # time_r
  92. EXTRA_DIST += time_r.h
  93. # timespec
  94. libtar_a_SOURCES += timespec.h
  95. # quote
  96. libtar_a_SOURCES += quote.h quote.c
  97. # quotearg
  98. libtar_a_SOURCES += quotearg.h quotearg.c
  99. # safe-read
  100. libtar_a_SOURCES += safe-read.h safe-read.c
  101. # safe-write
  102. libtar_a_SOURCES += safe-write.h safe-write.c
  103. # save-cwd
  104. libtar_a_SOURCES += save-cwd.h save-cwd.c
  105. # savedir
  106. libtar_a_SOURCES += savedir.h savedir.c
  107. # stdbool
  108. BUILT_SOURCES += $(STDBOOL_H)
  109. EXTRA_DIST += stdbool_.h
  110. # strcase
  111. EXTRA_DIST += strcase.h
  112. # We need the following in order to create an <stdbool.h> when the system
  113. # doesn't have one that works.
  114. all-local $(lib_OBJECTS): $(STDBOOL_H)
  115. stdbool.h: stdbool_.h
  116. sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
  117. mv $@-t $@
  118. MOSTLYCLEANFILES += stdbool.h stdbool.h-t
  119. # unlocked-io
  120. libtar_a_SOURCES += unlocked-io.h
  121. # xalloc
  122. libtar_a_SOURCES += xalloc.h xmalloc.c xstrdup.c
  123. # xgetcwd
  124. libtar_a_SOURCES += xgetcwd.h xgetcwd.c
  125. # xstrtol
  126. libtar_a_SOURCES += xstrtol.h xstrtol.c xstrtoul.c
  127. # xstrtoumax
  128. libtar_a_SOURCES += xstrtoumax.c