Makefile.am 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # Makefile for GNU tar library.
  2. # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003 Free
  3. # 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. # We need the following in order to create an <fnmatch.h> when the system
  52. # doesn't have one that supports the required API.
  53. all-local $(lib_OBJECTS): $(FNMATCH_H)
  54. fnmatch.h: fnmatch_.h
  55. cp $(srcdir)/fnmatch_.h $@-t
  56. mv $@-t $@
  57. MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
  58. # full-write
  59. libtar_a_SOURCES += full-write.h full-write.c
  60. # getdate
  61. libtar_a_SOURCES += getdate.h getdate.y
  62. BUILT_SOURCES += getdate.c
  63. MAINTAINERCLEANFILES += getdate.c
  64. #
  65. # Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
  66. $(srcdir)/getdate.c: getdate.y
  67. cd $(srcdir) && \
  68. $(YACC) $(YFLAGS) getdate.y && \
  69. mv -f y.tab.c getdate.c
  70. # getline
  71. libtar_a_SOURCES += getline.h
  72. EXTRA_DIST += getndelim2.h getndelim2.c
  73. # getopt
  74. libtar_a_SOURCES += getopt.h getopt.c getopt1.c
  75. # gettext
  76. libtar_a_SOURCES += gettext.h
  77. # hash
  78. libtar_a_SOURCES += hash.h hash.c
  79. # human
  80. libtar_a_SOURCES += human.h human.c
  81. # lchown
  82. libtar_a_SOURCES += lchown.h
  83. # modechange
  84. libtar_a_SOURCES += modechange.h modechange.c
  85. # pathmax
  86. libtar_a_SOURCES += pathmax.h
  87. # quote
  88. libtar_a_SOURCES += quote.h quote.c
  89. # quotearg
  90. libtar_a_SOURCES += quotearg.h quotearg.c
  91. # safe-read
  92. libtar_a_SOURCES += safe-read.h safe-read.c
  93. # safe-write
  94. libtar_a_SOURCES += safe-write.h safe-write.c
  95. # save-cwd
  96. libtar_a_SOURCES += save-cwd.h save-cwd.c
  97. # savedir
  98. libtar_a_SOURCES += savedir.h savedir.c
  99. # stdbool
  100. BUILT_SOURCES += $(STDBOOL_H)
  101. EXTRA_DIST += stdbool_.h
  102. # We need the following in order to create an <stdbool.h> when the system
  103. # doesn't have one that works.
  104. all-local $(lib_OBJECTS): $(STDBOOL_H)
  105. stdbool.h: stdbool_.h
  106. sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
  107. mv $@-t $@
  108. MOSTLYCLEANFILES += stdbool.h stdbool.h-t
  109. # unlocked-io
  110. libtar_a_SOURCES += unlocked-io.h
  111. # xalloc
  112. libtar_a_SOURCES += xalloc.h xmalloc.c xstrdup.c
  113. # xgetcwd
  114. libtar_a_SOURCES += xgetcwd.h xgetcwd.c
  115. # xstrtol
  116. libtar_a_SOURCES += xstrtol.h xstrtol.c xstrtoul.c
  117. # xstrtoumax
  118. libtar_a_SOURCES += xstrtoumax.c