source: trunk/essentials/app-arch/gzip/Makefile.kmk@ 3389

Last change on this file since 3389 was 3389, checked in by bird, 18 years ago

/bin/bash -> bash.exe

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# $Id: Makefile.kmk 3389 2007-06-10 16:15:55Z bird $
2## @file
3#
4# kNIX Makefile for gzip
5#
6# Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
7#
8#
9# This file is part of kLIBC.
10#
11# kLIBC 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# kLIBC 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 kLIBC; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
26
27DEPTH = ../../..
28include $(PATH_KBUILD)/header.kmk
29
30
31#
32# Internal library.
33#
34LIBRARIES += libgzip
35libgzip_TEMPLATE = usr.bin
36libgzip_NOINST = yes
37libgzip_DEFS = HAVE_CONFIG_H
38libgzip_INCS = $(PATH_TARGET) lib
39libgzip_SOURCES = \
40 lib/xalloc-die.c \
41 lib/creat-safer.c \
42 lib/dup-safer.c \
43 lib/exitfail.c \
44 lib/fd-safer.c \
45 lib/open-safer.c \
46 lib/pipe-safer.c \
47 lib/utimens.c \
48 lib/xmalloc.c \
49 lib/yesno.c
50libgzip_ORDERDEPS = $(PATH_TARGET)/config.h
51
52#
53# The gzip program and associated scripts.
54#
55PROGRAMS += gzip
56gzip_TEMPLATE = usr.bin
57gzip_DEFS = HAVE_CONFIG_H
58gzip_INCS = $(PATH_TARGET) lib
59gzip_SOURCES = \
60 bits.c \
61 crypt.c \
62 deflate.c \
63 gzip.c \
64 inflate.c \
65 lzw.c \
66 trees.c \
67 unlzh.c \
68 unlzw.c \
69 unpack.c \
70 unzip.c \
71 util.c \
72 zip.c
73gzip_LIBS = $(TARGET_libgzip)
74gzip_ORDERDEPS = $(PATH_TARGET)/config.h
75
76INSTALLS += gzip-scripts
77gzip-scripts_TEMPLATE = usr.bin.script
78gzip-scripts_SOURCES = \
79 $(PATH_TARGET)/gunzip \
80 $(PATH_TARGET)/gzexe \
81 $(PATH_TARGET)/zcat \
82 $(PATH_TARGET)/zcmp \
83 $(PATH_TARGET)/zdiff \
84 $(PATH_TARGET)/zegrep \
85 $(PATH_TARGET)/zfgrep \
86 $(PATH_TARGET)/zforce \
87 $(PATH_TARGET)/zgrep \
88 $(PATH_TARGET)/zless \
89 $(PATH_TARGET)/zmore \
90 $(PATH_TARGET)/znew
91gzip-scripts_SYMLINKS = \
92 uncompress=>gunzip
93
94$(gzip-scripts_SOURCES): $$(notdir $$(@)).in
95 $(SED) \
96 -e 's|/bin/sh|sh.exe|g' \
97 -e 's|/bin/bash|bash.exe|g' \
98 -e 's|BINDIR|${GZIP_BINDIR-'\''/@unixroot/usr/bin'\''}|g' \
99 -e 's|[@]VERSION@|1.3.11|g' \
100 $< > $@
101
102$(PATH_TARGET)/config.h: kNIX-bootstrap-os2.x86-config.h | $(call DIRDEP,$(PATH_TARGET))
103 $(CP) -f $< $@
104
105#
106# The man pages.
107#
108INSTALLS += gzip-manpages
109gzip-manpages_TEMPLATE = usr.bin.man
110gzip-manpages_SOURCES = \
111 gunzip.1 \
112 gzexe.1 \
113 gzip.1 \
114 zcat.1 \
115 zcmp.1 \
116 zdiff.1 \
117 zforce.1 \
118 zgrep.1 \
119 zless.1 \
120 zmore.1 \
121 znew.1
122
123
124#
125# Documentation.
126#
127INSTALLS += gzip-docs
128gzip-docs_TEMPLATE = usr.bin.doc
129gzip-docs_SOURCES = \
130 ChangeLog \
131 NEWS \
132 README \
133 THANKS \
134 TODO \
135 algorithm.doc \
136 gzip.doc
137
138#
139# Integrity checks.
140#
141OTHERS += $(PATH_TARGET)/gzip-tests
142OTHER_CLEAN += \
143 $(PATH_TARGET)/gzip.doc.gz \
144
145$(PATH_TARGET)/gzip-tests: $$(TARGET_gzip) $(gzip-scripts_SOURCES)
146 $(RM) -f $@
147 $(TARGET_gzip) -c gzip.doc > $(PATH_TARGET)/gzip.doc.gz
148 GZIP_BINDIR="$(PATH_gzip)" $(PATH_TARGET)/zdiff -c $(PATH_TARGET)/gzip.doc.gz gzip.doc
149 GZIP_BINDIR="$(PATH_gzip)" $(PATH_TARGET)/zdiff -c gzip.doc $(PATH_TARGET)/gzip.doc.gz
150 GZIP_BINDIR="$(PATH_gzip)" $(PATH_TARGET)/zdiff -c - gzip.doc < $(PATH_TARGET)/gzip.doc.gz
151 GZIP_BINDIR="$(PATH_gzip)" $(PATH_TARGET)/zdiff -c - $(PATH_TARGET)/gzip.doc.gz < gzip.doc
152 GZIP_BINDIR="$(PATH_gzip)" $(PATH_TARGET)/zgrep -iV > /dev/null
153 $(foreach file,$(TARGET_gzip) $(gzip-scripts_SOURCES),\
154 $(NL)$(TAB)$(TARGET_gzip) -cv -- "$(file)" | $(TARGET_gzip) -d | cmp - "$(file)")
155 $(APPEND) $@ done
156
157include $(PATH_KBUILD)/footer.kmk
158
Note: See TracBrowser for help on using the repository browser.