[3359] | 1 | # $Id: kNIX-bootstrap.kmk 3168 2007-04-22 02:45:50Z bird $
|
---|
| 2 | ## @file
|
---|
| 3 | #
|
---|
| 4 | # kNIX Boostrap Makefile for tar
|
---|
| 5 | #
|
---|
| 6 | # Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
|
---|
| 7 | #
|
---|
| 8 | #
|
---|
| 9 | # This file is part of kNIX.
|
---|
| 10 | #
|
---|
| 11 | # kNIX is free software; you can redistribute it and/or modify
|
---|
| 12 | # it under the terms of the GNU General Public License as published by
|
---|
| 13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 14 | # (at your option) any later version.
|
---|
| 15 | #
|
---|
| 16 | # kNIX is distributed in the hope that it will be useful,
|
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | # GNU General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with kNIX; if not, write to the Free Software
|
---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 24 | #
|
---|
| 25 | #
|
---|
| 26 |
|
---|
| 27 | DEPTH = ../../..
|
---|
| 28 | include $(PATH_KBUILD)/header.kmk
|
---|
| 29 |
|
---|
| 30 | #
|
---|
| 31 | # The tar template.
|
---|
| 32 | #
|
---|
[3622] | 33 | TEMPLATE_tar = tar template
|
---|
[3359] | 34 | TEMPLATE_tar_EXTENDS = bin
|
---|
| 35 | TEMPLATE_tar_DEFS = $(TEMPLATE_bin_DEFS) \
|
---|
| 36 | HAVE_CONFIG_H
|
---|
| 37 | TEMPLATE_tar_INCS = $(TEMPLATE_bin_INCS) \
|
---|
| 38 | $(PATH_TARGET) \
|
---|
| 39 | $(PATH_SUB_ROOT) \
|
---|
| 40 | $(PATH_SUB_ROOT)/lib
|
---|
| 41 | TEMPLATE_tar_ORDERDEPS = $(TEMPLATE_bin_ORDERDEPS) \
|
---|
| 42 | $(PATH_TARGET)/config.h \
|
---|
| 43 | $(PATH_TARGET)/configmake.h \
|
---|
| 44 | $(PATH_TARGET)/fnmatch.h \
|
---|
| 45 | $(PATH_TARGET)/getopt.h \
|
---|
| 46 | $(PATH_TARGET)/rmt-command.h
|
---|
| 47 |
|
---|
| 48 | #
|
---|
| 49 | # libtar - internal library.
|
---|
| 50 | #
|
---|
| 51 | LIBRARIES += libtar
|
---|
| 52 | libtar_TEMPLATE = tar
|
---|
| 53 | libtar_NOINST = yes
|
---|
| 54 | libtar_SOURCES = \
|
---|
| 55 | lib/allocsa.c \
|
---|
| 56 | lib/argp-ba.c \
|
---|
| 57 | lib/argp-eexst.c \
|
---|
| 58 | lib/argp-fmtstream.c \
|
---|
| 59 | lib/argp-fs-xinl.c \
|
---|
| 60 | lib/argp-help.c \
|
---|
| 61 | lib/argp-parse.c \
|
---|
| 62 | lib/argp-pin.c \
|
---|
| 63 | lib/argp-pv.c \
|
---|
| 64 | lib/argp-pvh.c \
|
---|
| 65 | lib/argp-xinl.c \
|
---|
| 66 | lib/full-write.c \
|
---|
| 67 | lib/getdate.c \
|
---|
| 68 | lib/localcharset.c \
|
---|
| 69 | lib/strnlen1.c \
|
---|
| 70 | lib/version-etc.c \
|
---|
| 71 | lib/version-etc-fsf.c \
|
---|
| 72 | lib/xalloc-die.c \
|
---|
| 73 | lib/xstrndup.c \
|
---|
| 74 | lib/xstrtoumax.c \
|
---|
| 75 | lib/paxerror.c \
|
---|
| 76 | lib/paxexit.c \
|
---|
| 77 | lib/paxnames.c \
|
---|
| 78 | lib/prepargs.c \
|
---|
| 79 | lib/rtapelib.c \
|
---|
| 80 | lib/stdopen.c \
|
---|
| 81 | lib/argmatch.c \
|
---|
| 82 | lib/asnprintf.c \
|
---|
| 83 | lib/backupfile.c \
|
---|
| 84 | lib/basename.c \
|
---|
| 85 | lib/chdir-long.c \
|
---|
| 86 | lib/close-stream.c \
|
---|
| 87 | lib/closeout.c \
|
---|
| 88 | lib/creat-safer.c \
|
---|
| 89 | lib/dirname.c \
|
---|
| 90 | lib/dup-safer.c \
|
---|
| 91 | lib/exclude.c \
|
---|
| 92 | lib/exitfail.c \
|
---|
| 93 | lib/fchmodat.c \
|
---|
| 94 | lib/fd-safer.c \
|
---|
| 95 | lib/fnmatch.c \
|
---|
| 96 | lib/getcwd.c \
|
---|
| 97 | lib/getopt.c \
|
---|
| 98 | lib/getopt1.c \
|
---|
| 99 | lib/gettime.c \
|
---|
| 100 | lib/hash.c \
|
---|
| 101 | lib/human.c \
|
---|
| 102 | lib/imaxtostr.c \
|
---|
| 103 | lib/mbchar.c \
|
---|
| 104 | lib/mkdirat.c \
|
---|
| 105 | lib/modechange.c \
|
---|
| 106 | lib/offtostr.c \
|
---|
| 107 | lib/open-safer.c \
|
---|
| 108 | lib/openat.c \
|
---|
| 109 | lib/openat-die.c \
|
---|
| 110 | lib/openat-proc.c \
|
---|
| 111 | lib/pipe-safer.c \
|
---|
| 112 | lib/printf-args.c \
|
---|
| 113 | lib/printf-parse.c \
|
---|
| 114 | lib/quote.c \
|
---|
| 115 | lib/quotearg.c \
|
---|
| 116 | lib/rpmatch.c \
|
---|
| 117 | lib/safe-read.c \
|
---|
| 118 | lib/safe-write.c \
|
---|
| 119 | lib/save-cwd.c \
|
---|
| 120 | lib/savedir.c \
|
---|
| 121 | lib/strcasecmp.c \
|
---|
| 122 | lib/stripslash.c \
|
---|
| 123 | lib/tempname.c \
|
---|
| 124 | lib/uinttostr.c \
|
---|
| 125 | lib/umaxtostr.c \
|
---|
| 126 | lib/unlinkdir.c \
|
---|
| 127 | lib/utimens.c \
|
---|
| 128 | lib/vasnprintf.c \
|
---|
| 129 | lib/xgetcwd.c \
|
---|
| 130 | lib/xmalloc.c \
|
---|
| 131 | lib/xstrtol.c \
|
---|
| 132 | lib/xstrtoul.c
|
---|
| 133 |
|
---|
| 134 | #
|
---|
| 135 | # tar
|
---|
| 136 | #
|
---|
| 137 | PROGRAMS += tar
|
---|
| 138 | tar_TEMPLATE = tar
|
---|
| 139 | tar_INCS = src
|
---|
| 140 | tar_SOURCES = \
|
---|
| 141 | src/buffer.c \
|
---|
| 142 | src/compare.c \
|
---|
| 143 | src/create.c \
|
---|
| 144 | src/delete.c \
|
---|
| 145 | src/extract.c \
|
---|
| 146 | src/incremen.c \
|
---|
| 147 | src/list.c \
|
---|
| 148 | src/misc.c \
|
---|
| 149 | src/names.c \
|
---|
| 150 | src/sparse.c \
|
---|
| 151 | src/system.c \
|
---|
| 152 | src/tar.c \
|
---|
| 153 | src/transform.c \
|
---|
| 154 | src/update.c \
|
---|
| 155 | src/utf8.c \
|
---|
| 156 | src/xheader.c
|
---|
| 157 |
|
---|
| 158 | tar_LIBS = $(TARGET_libtar)
|
---|
| 159 |
|
---|
| 160 | #
|
---|
| 161 | # config.h, configmake.h, fnmatch.h, getopt.h
|
---|
| 162 | #
|
---|
| 163 | $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h | $(call DIRDEP,$(PATH_TARGET))
|
---|
| 164 | $(INSTALL) $< $@
|
---|
| 165 |
|
---|
| 166 | $(PATH_TARGET)/configmake.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-configmake.h | $(call DIRDEP,$(PATH_TARGET))
|
---|
| 167 | $(INSTALL) $< $@
|
---|
| 168 |
|
---|
| 169 | $(PATH_TARGET)/fnmatch.h: lib/fnmatch_.h | $(call DIRDEP,$(PATH_TARGET))
|
---|
| 170 | $(INSTALL) $< $@
|
---|
| 171 |
|
---|
| 172 | $(PATH_TARGET)/getopt.h: lib/getopt_.h | $(call DIRDEP,$(PATH_TARGET))
|
---|
| 173 | $(INSTALL) $< $@
|
---|
| 174 |
|
---|
| 175 | $(PATH_TARGET)/rmt-command.h: | $(call DIRDEP,$(PATH_TARGET))
|
---|
| 176 | $(RM) -f $@
|
---|
| 177 | $(APPEND) $@ '#define DEFAULT_RMT_COMMAND "/@unixroot/usr/libexec/rmt.exe"'
|
---|
| 178 |
|
---|
| 179 | include $(PATH_KBUILD)/footer.kmk
|
---|
| 180 |
|
---|