openpkg/patch.Makefile.in

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

michael@428 1 # Makefile for GNU patch.
michael@428 2
michael@428 3 # Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2009
michael@428 4 # Free Software Foundation, Inc.
michael@428 5
michael@428 6 # This program is free software; you can redistribute it and/or modify
michael@428 7 # it under the terms of the GNU General Public License as published by
michael@428 8 # the Free Software Foundation; either version 2, or (at your option)
michael@428 9 # any later version.
michael@428 10
michael@428 11 # This program is distributed in the hope that it will be useful,
michael@428 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
michael@428 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
michael@428 14 # GNU General Public License for more details.
michael@428 15
michael@428 16 # You should have received a copy of the GNU General Public License
michael@428 17 # along with this program; see the file COPYING.
michael@428 18 # If not, write to the Free Software Foundation,
michael@428 19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
michael@428 20
michael@428 21 #### Start of system configuration section. ####
michael@428 22
michael@428 23 srcdir = @srcdir@
michael@428 24 VPATH = @srcdir@
michael@428 25
michael@428 26 @SET_MAKE@
michael@428 27
michael@428 28 CC = @CC@
michael@428 29 ed_PROGRAM = @ed_PROGRAM@
michael@428 30 INSTALL = @INSTALL@
michael@428 31 INSTALL_PROGRAM = @INSTALL_PROGRAM@
michael@428 32 INSTALL_DATA = @INSTALL_DATA@
michael@428 33 TEST_SHELL = @TEST_SHELL@
michael@428 34 transform = @program_transform_name@
michael@428 35
michael@428 36 CFLAGS = @CFLAGS@
michael@428 37 CPPFLAGS = @CPPFLAGS@
michael@428 38 DEFS = @DEFS@
michael@428 39 EXEEXT = @EXEEXT@
michael@428 40 LDFLAGS = @LDFLAGS@
michael@428 41 LIBOBJDIR = gl/lib/
michael@428 42 LIBOBJS = @LIBOBJS@ ${LIBOBJDIR}full-write$U.o
michael@428 43 LIBS = @LIBS@
michael@428 44 OBJEXT = @OBJEXT@
michael@428 45 PACKAGE_NAME = @PACKAGE_NAME@
michael@428 46 PACKAGE_VERSION = @PACKAGE_VERSION@
michael@428 47 STDBOOL_H = @STDBOOL_H@
michael@428 48 GETOPT_H = @GETOPT_H@
michael@428 49 HAVE__BOOL = @HAVE__BOOL@
michael@428 50 ENABLE_MERGE = @ENABLE_MERGE@
michael@428 51
michael@428 52 prefix = @prefix@
michael@428 53 exec_prefix = @exec_prefix@
michael@428 54 bindir = @bindir@
michael@428 55
michael@428 56 # Where to put the manual pages.
michael@428 57 datarootdir = @datarootdir@
michael@428 58 mandir = @mandir@
michael@428 59 man1dir = $(mandir)/man1
michael@428 60 # Extension (including `.') for the manual page filenames.
michael@428 61 man1ext = .1
michael@428 62
michael@428 63 # Hook for nonstandard builds.
michael@428 64 CONFIG_STATUS = config.status
michael@428 65
michael@428 66 #### End of system configuration section. ####
michael@428 67
michael@428 68 SHELL = /bin/sh
michael@428 69
michael@428 70 LIBSRCS = \
michael@428 71 gl/lib/argmatch.c \
michael@428 72 gl/lib/backupfile.c \
michael@428 73 gl/lib/basename.c \
michael@428 74 gl/lib/dirname.c \
michael@428 75 gl/lib/error.c \
michael@428 76 gl/lib/exitfail.c \
michael@428 77 gl/lib/full-write.c \
michael@428 78 gl/lib/getopt1.c \
michael@428 79 gl/lib/getopt.c \
michael@428 80 gl/lib/hash.c \
michael@428 81 gl/lib/malloc.c \
michael@428 82 gl/lib/mbrtowc.c \
michael@428 83 gl/lib/memchr.c \
michael@428 84 gl/lib/quotearg.c \
michael@428 85 gl/lib/quote.c \
michael@428 86 gl/lib/realloc.c \
michael@428 87 gl/lib/rename.c \
michael@428 88 gl/lib/safe-read.c \
michael@428 89 gl/lib/safe-write.c \
michael@428 90 gl/lib/strcasecmp.c \
michael@428 91 gl/lib/stripslash.c \
michael@428 92 gl/lib/strncasecmp.c \
michael@428 93 gl/lib/strndup.c \
michael@428 94 gl/lib/xmalloc.c \
michael@428 95 gl/lib/xstrndup.c
michael@428 96
michael@428 97 SRCS = $(LIBSRCS) \
michael@428 98 src/inp.c \
michael@428 99 src/maketime.c \
michael@428 100 src/merge.c \
michael@428 101 src/partime.c \
michael@428 102 src/patch.c \
michael@428 103 src/pch.c \
michael@428 104 src/quotesys.c \
michael@428 105 src/util.c \
michael@428 106 src/version.c
michael@428 107
michael@428 108 MERGEOBJ = src/merge.$(OBJEXT)
michael@428 109
michael@428 110 OBJS = $(LIBOBJS) $(MERGEOBJ) \
michael@428 111 src/inp.$(OBJEXT) \
michael@428 112 src/maketime.$(OBJEXT) \
michael@428 113 src/partime.$(OBJEXT) \
michael@428 114 src/patch.$(OBJEXT) \
michael@428 115 src/pch.$(OBJEXT) \
michael@428 116 src/quotesys.$(OBJEXT) \
michael@428 117 src/util.$(OBJEXT) \
michael@428 118 src/version.$(OBJEXT)
michael@428 119
michael@428 120 LIBHDRS = \
michael@428 121 gl/lib/argmatch.h \
michael@428 122 gl/lib/backupfile.h \
michael@428 123 gl/lib/dirname.h \
michael@428 124 gl/lib/error.h \
michael@428 125 gl/lib/exitfail.h \
michael@428 126 gl/lib/full-write.h \
michael@428 127 gl/lib/getopt.hin \
michael@428 128 gl/lib/getopt_int.h \
michael@428 129 gl/lib/gettext.h \
michael@428 130 gl/lib/hash.h \
michael@428 131 gl/lib/minmax.h \
michael@428 132 gl/lib/quotearg.h \
michael@428 133 gl/lib/quote.h \
michael@428 134 gl/lib/safe-write.h \
michael@428 135 gl/lib/stdbool.hin \
michael@428 136 gl/lib/unlocked-io.h \
michael@428 137 gl/lib/verify.h \
michael@428 138 gl/lib/xalloc.h \
michael@428 139 gl/lib/xstrndup.h
michael@428 140
michael@428 141 HDRS = $(LIBHDRS) \
michael@428 142 src/bestmatch.h \
michael@428 143 src/common.h \
michael@428 144 src/diffseq.h \
michael@428 145 src/inp.h \
michael@428 146 src/maketime.h \
michael@428 147 src/partime.h \
michael@428 148 src/pch.h \
michael@428 149 src/quotesys.h \
michael@428 150 src/util.h \
michael@428 151 src/version.h
michael@428 152
michael@428 153 MISC = \
michael@428 154 AUTHORS \
michael@428 155 COPYING \
michael@428 156 ChangeLog \
michael@428 157 INSTALL \
michael@428 158 Makefile.in \
michael@428 159 NEWS \
michael@428 160 README \
michael@428 161 VERSION \
michael@428 162 aclocal.m4 \
michael@428 163 config.guess\
michael@428 164 config.hin \
michael@428 165 config.sub \
michael@428 166 configure \
michael@428 167 configure.ac \
michael@428 168 install-sh \
michael@428 169 mkinstalldirs \
michael@428 170 patch.man \
michael@428 171 tests/test-lib.sh \
michael@428 172 update-version.sh
michael@428 173
michael@428 174 DISTFILES = $(MISC) $(SRCS) $(HDRS) $(M4FILES) \
michael@428 175 pc/chdirsaf.c \
michael@428 176 pc/djgpp/config.sed \
michael@428 177 pc/djgpp/configure.bat \
michael@428 178 pc/djgpp/configure.sed \
michael@428 179 pc/djgpp/README
michael@428 180
michael@428 181 MORE_DISTFILES = $(TESTS) $(BROKEN_TESTS)
michael@428 182
michael@428 183 patch_name = `echo patch | sed '$(transform)'`
michael@428 184
michael@428 185 all:: src/patch$(EXEEXT)
michael@428 186
michael@428 187 info::
michael@428 188 installcheck::
michael@428 189
michael@428 190 TESTS = \
michael@428 191 tests/asymmetric-hunks \
michael@428 192 tests/backup-prefix-suffix \
michael@428 193 tests/corrupt-reject-files \
michael@428 194 tests/create-delete \
michael@428 195 tests/crlf-handling \
michael@428 196 tests/filename-choice \
michael@428 197 tests/global-reject-files \
michael@428 198 tests/inname \
michael@428 199 tests/line-numbers \
michael@428 200 tests/merge \
michael@428 201 tests/munged-context-format \
michael@428 202 tests/need-filename \
michael@428 203 tests/no-newline-triggers-assert \
michael@428 204 tests/preserve-c-function-names \
michael@428 205 tests/preserve-mode-and-timestamp \
michael@428 206 tests/reject-format \
michael@428 207 tests/remember-backup-files \
michael@428 208 tests/remember-reject-files \
michael@428 209 tests/unmodified-files
michael@428 210
michael@428 211 BROKEN_TESTS = \
michael@428 212 tests/dash-o-append
michael@428 213
michael@428 214 check:: $(TESTS)
michael@428 215 @echo All tests succeeded!
michael@428 216
michael@428 217 .PHONY: $(TESTS) $(BROKEN_TESTS)
michael@428 218 $(TESTS) $(BROKEN_TESTS): all
michael@428 219 @echo "[$@]"
michael@428 220 @srcdir=$(srcdir)/tests $(TEST_SHELL) $(srcdir)/$@
michael@428 221
michael@428 222 DEFINE_ENABLE_MERGE = -DENABLE_MERGE
michael@428 223 COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
michael@428 224 $(DEFINE_ENABLE_MERGE) -I. -I$(srcdir)/src -I$(srcdir)/gl/lib $(CFLAGS)
michael@428 225
michael@428 226 .c.$(OBJEXT):
michael@428 227 @mkdir -p $(@D)
michael@428 228 $(COMPILE) -o $@ $<
michael@428 229
michael@428 230 src/patch$(EXEEXT): $(OBJS)
michael@428 231 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
michael@428 232
michael@428 233 install:: all
michael@428 234 $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
michael@428 235 $(INSTALL_PROGRAM) src/patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
michael@428 236 $(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
michael@428 237
michael@428 238 install-strip::
michael@428 239 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
michael@428 240
michael@428 241 uninstall::
michael@428 242 rm -f $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT) \
michael@428 243 $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
michael@428 244
michael@428 245 Makefile: Makefile.in $(CONFIG_STATUS)
michael@428 246 $(SHELL) $(CONFIG_STATUS)
michael@428 247 FORCE:
michael@428 248 VERSION: FORCE
michael@428 249 @cd $(srcdir) && $(SHELL) ./update-version.sh VERSION
michael@428 250 config.status: configure
michael@428 251 $(SHELL) $(CONFIG_STATUS) --recheck
michael@428 252 configure: configure.ac $(srcdir)/aclocal.m4 $(srcdir)/VERSION
michael@428 253 cd $(srcdir) && autoconf --force
michael@428 254 config.hin: configure.ac $(srcdir)/aclocal.m4
michael@428 255 cd $(srcdir) && autoheader --force
michael@428 256
michael@428 257 # We need the following in order to create <getopt.h> when the system
michael@428 258 # doesn't have one that works with the given compiler.
michael@428 259 getopt.h: gl/lib/getopt.hin
michael@428 260 rm -f $@-t $@
michael@428 261 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
michael@428 262 cat $(srcdir)/gl/lib/getopt.hin; \
michael@428 263 } > $@-t
michael@428 264 mv -f $@-t $@
michael@428 265
michael@428 266 # We need the following in order to create <stdbool.h> when the system
michael@428 267 # doesn't have one that works.
michael@428 268 #gl/lib/stdbool.h: gl/lib/stdbool.hin
michael@428 269 stdbool.h: gl/lib/stdbool.hin
michael@428 270 rm -f $@-t $@
michael@428 271 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
michael@428 272 sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
michael@428 273 < $(srcdir)/gl/lib/stdbool.hin; \
michael@428 274 } > $@-t
michael@428 275 mv $@-t $@
michael@428 276
michael@428 277 LIBM4FILES = \
michael@428 278 gl/m4/argmatch.m4 \
michael@428 279 gl/m4/backupfile.m4 \
michael@428 280 gl/m4/d-ino.m4 \
michael@428 281 gl/m4/dirname.m4 \
michael@428 282 gl/m4/dos.m4 \
michael@428 283 gl/m4/double-slash-root.m4 \
michael@428 284 gl/m4/error.m4 \
michael@428 285 gl/m4/exitfail.m4 \
michael@428 286 gl/m4/extensions.m4 \
michael@428 287 gl/m4/getopt.m4 \
michael@428 288 gl/m4/gettext.m4 \
michael@428 289 gl/m4/hash.m4 \
michael@428 290 gl/m4/inline.m4 \
michael@428 291 gl/m4/malloc.m4 \
michael@428 292 gl/m4/mbrtowc.m4 \
michael@428 293 gl/m4/mbstate_t.m4 \
michael@428 294 gl/m4/memchr.m4 \
michael@428 295 gl/m4/minmax.m4 \
michael@428 296 gl/m4/onceonly.m4 \
michael@428 297 gl/m4/quotearg.m4 \
michael@428 298 gl/m4/quote.m4 \
michael@428 299 gl/m4/realloc.m4 \
michael@428 300 gl/m4/rename.m4 \
michael@428 301 gl/m4/safe-write.m4 \
michael@428 302 gl/m4/ssize_t.m4 \
michael@428 303 gl/m4/stdbool.m4 \
michael@428 304 gl/m4/strcase.m4 \
michael@428 305 gl/m4/strndup.m4 \
michael@428 306 gl/m4/unlocked-io.m4 \
michael@428 307 gl/m4/utimbuf.m4 \
michael@428 308 gl/m4/xalloc.m4 \
michael@428 309 gl/m4/xstrndup.m4
michael@428 310
michael@428 311 M4FILES = $(LIBM4FILES) \
michael@428 312 m4/mkdir.m4 \
michael@428 313 m4/setmode.m4
michael@428 314
michael@428 315 $(srcdir)/aclocal.m4: $(M4FILES)
michael@428 316 aclocal -I m4 -I gl/m4
michael@428 317
michael@428 318 TAGS: $(HDRS) $(SRCS)
michael@428 319 etags $(HDRS) $(SRCS)
michael@428 320
michael@428 321 mostlyclean::
michael@428 322 rm -f core* *core src/*.$(OBJEXT) gl/lib/*.$(OBJEXT) \
michael@428 323 stdbool.h getopt.h gl/lib/*.h-t
michael@428 324
michael@428 325 clean:: mostlyclean
michael@428 326 rm -f src/patch$(EXEEXT)
michael@428 327
michael@428 328 distclean:: clean
michael@428 329 rm -f Makefile config.cache config.hin~ config.log config.status \
michael@428 330 config.h
michael@428 331 rm -rf autom4te.cache/
michael@428 332
michael@428 333 maintainer-clean::
michael@428 334 @echo "This command is intended for maintainers to use;"
michael@428 335 @echo "rebuilding the deleted files requires special tools."
michael@428 336 $(MAKE) distclean
michael@428 337 rm -f TAGS VERSION aclocal.m4 config.hin configure \
michael@428 338 patch-*.tar.gz patch-*.tar.gz.sig
michael@428 339
michael@428 340 PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
michael@428 341
michael@428 342 dist:: $(DISTFILES)
michael@428 343 @rm -rf $(PV)
michael@428 344 @ln -s . $(PV)
michael@428 345 @tar -cf - `( printf "%s\n" $(DISTFILES) $(MORE_DISTFILES); \
michael@428 346 grep -q -E -- '-[0-9]+-[0-9a-z]+(-dirty)?$$' VERSION \
michael@428 347 && echo README-alpha \
michael@428 348 ) | sed -e 's,^$(srcdir)/,,' -e "s,^,$(PV)/," \
michael@428 349 | LC_ALL=C sort` \
michael@428 350 | gzip -9 > $(PV).tar.gz
michael@428 351 @if which bzip2 >/dev/null 2>/dev/null; then \
michael@428 352 gzip -d < $(PV).tar.gz | bzip2 -9 > $(PV).tar.bz2; fi
michael@428 353 @if which xz >/dev/null 2>/dev/null; then \
michael@428 354 gzip -d < $(PV).tar.gz | xz -9 > $(PV).tar.xz; fi
michael@428 355 @rm -rf $(PV)
michael@428 356 @whereto=$$(if grep -q -E -- '-[0-9]+-[0-9a-z]+(-dirty)?$$' VERSION; \
michael@428 357 then echo alpha; else echo ftp; fi); \
michael@428 358 echo; \
michael@428 359 echo "# gnupload --to $$whereto.gnu.org:patch $(PV).tar.gz"; \
michael@428 360 test ! -e $(PV).tar.bz2 || echo "# gnupload" \
michael@428 361 "--to $$whereto.gnu.org:patch $(PV).tar.bz2"; \
michael@428 362 test ! -e $(PV).tar.xz || echo "# gnupload" \
michael@428 363 "--to $$whereto.gnu.org:patch $(PV).tar.xz"; \
michael@428 364 echo
michael@428 365
michael@428 366 $(OBJS): config.h
michael@428 367 COMMON = src/common.h $(STDBOOL_H)
michael@428 368
michael@428 369 gl/lib/addext.$(OBJEXT): gl/lib/backupfile.h gl/lib/dirname.h
michael@428 370 gl/lib/argmatch.$(OBJEXT): $(STDBOOL_H) gl/lib/argmatch.h gl/lib/gettext.h \
michael@428 371 gl/lib/error.h gl/lib/quote.h gl/lib/quotearg.h gl/lib/unlocked-io.h
michael@428 372 gl/lib/backupfile.$(OBJEXT): gl/lib/argmatch.h gl/lib/backupfile.h \
michael@428 373 gl/lib/dirname.h
michael@428 374 gl/lib/basename.$(OBJEXT): gl/lib/dirname.h
michael@428 375 gl/lib/dirname.$(OBJEXT): gl/lib/dirname.h gl/lib/xalloc.h
michael@428 376 gl/lib/error.$(OBJEXT): gl/lib/error.h gl/lib/gettext.h gl/lib/unlocked-io.h
michael@428 377 gl/lib/exitfail.$(OBJEXT): gl/lib/exitfail.h
michael@428 378 gl/lib/full-write.$(OBJEXT): gl/lib/full-write.h gl/lib/safe-write.h
michael@428 379 gl/lib/getopt.$(OBJEXT) gl/lib/getopt1.$(OBJEXT): getopt.h
michael@428 380 gl/lib/hash.$(OBJEXT): $(STDBOOL_H) gl/lib/hash.h
michael@428 381 gl/lib/safe-read.$(OBJEXT): gl/lib/safe-write.h
michael@428 382 gl/lib/safe-write.$(OBJEXT): gl/lib/safe-read.c
michael@428 383
michael@428 384 src/inp.$(OBJEXT): gl/lib/backupfile.h $(COMMON) src/inp.h src/pch.h \
michael@428 385 gl/lib/quotearg.h src/util.h gl/lib/xalloc.h
michael@428 386 src/maketime.$(OBJEXT): src/maketime.h src/partime.h
michael@428 387 src/partime.$(OBJEXT): src/partime.h
michael@428 388 src/patch.$(OBJEXT): gl/lib/argmatch.h gl/lib/backupfile.h $(COMMON) \
michael@428 389 gl/lib/exitfail.h $(GETOPT_H) src/inp.h src/pch.h \
michael@428 390 gl/lib/quotearg.h src/util.h src/version.h gl/lib/xalloc.h
michael@428 391 src/pch.$(OBJEXT): gl/lib/backupfile.h $(COMMON) gl/lib/dirname.h src/inp.h \
michael@428 392 src/pch.h gl/lib/quotearg.h src/util.h
michael@428 393 gl/lib/quote.$(OBJECT): gl/lib/quote.h gl/lib/quotearg.h
michael@428 394 gl/lib/quotearg.$(OBJEXT): gl/lib/gettext.h gl/lib/quotearg.h gl/lib/xalloc.h
michael@428 395 src/quotesys.$(OBJEXT): src/quotesys.h
michael@428 396 gl/lib/strncasecmp.$(OBJEXT): gl/lib/strcasecmp.c
michael@428 397 src/util.$(OBJEXT): gl/lib/backupfile.h $(COMMON) gl/lib/dirname.h gl/lib/full-write.h \
michael@428 398 gl/lib/hash.h src/maketime.h src/partime.h gl/lib/quotearg.h \
michael@428 399 src/quotesys.h src/util.h src/version.h gl/lib/xalloc.h
michael@428 400 src/version.$(OBJEXT): $(COMMON) src/version.h
michael@428 401 gl/lib/xmalloc.$(OBJEXT): gl/lib/error.h gl/lib/exitfail.h gl/lib/gettext.h \
michael@428 402 gl/lib/xalloc.h

mercurial