Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/sysinst Allow for building with an alternate d...



details:   https://anonhg.NetBSD.org/src/rev/a883448e8480
branches:  trunk
changeset: 484071:a883448e8480
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 24 21:56:04 2000 +0000

description:
Allow for building with an alternate default FTP server and alternate
default FTP directory, based on mk.conf variables SYSINST_FTP_HOST
and SYSINST_FTP_DIR.

diffstat:

 distrib/utils/sysinst/Makefile.inc |  12 +++++++++++-
 distrib/utils/sysinst/defs.h       |  16 +++++++++++++---
 2 files changed, 24 insertions(+), 4 deletions(-)

diffs (60 lines):

diff -r f95ca6ecbd67 -r a883448e8480 distrib/utils/sysinst/Makefile.inc
--- a/distrib/utils/sysinst/Makefile.inc        Fri Mar 24 21:30:58 2000 +0000
+++ b/distrib/utils/sysinst/Makefile.inc        Fri Mar 24 21:56:04 2000 +0000
@@ -1,7 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.6 1999/12/27 20:31:32 garbled Exp $
+#      $NetBSD: Makefile.inc,v 1.7 2000/03/24 21:56:04 thorpej Exp $
 #
 # Makefile for install
 
+.include <bsd.own.mk>          # for mk.conf
+
 PROG=sysinst
 
 LDADD=-lcurses -ltermcap -lutil
@@ -17,6 +19,14 @@
 CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
         -DREL=\"${VER}\" -DMACH=\"${MACHINE}\"
 
+.if defined(SYSINST_FTP_HOST)
+CPPFLAGS+=-DFTP_HOST="${SYSINST_FTP_HOST}"
+.endif
+
+.if defined(SYSINST_FTP_DIR)
+CPPFLAGS+=-DFTP_DIR="${SYSINST_FTP_DIR}"
+.endif
+
 MKMAN=no
 
 WARNS=1
diff -r f95ca6ecbd67 -r a883448e8480 distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h      Fri Mar 24 21:30:58 2000 +0000
+++ b/distrib/utils/sysinst/defs.h      Fri Mar 24 21:56:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.51 2000/03/14 22:42:48 fvdl Exp $   */
+/*     $NetBSD: defs.h,v 1.52 2000/03/24 21:56:04 thorpej Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -179,9 +179,19 @@
 EXTERN int  clean_dist_dir INIT(0);
 /* Absolute path name where the distribution should be extracted from. */
 
+#if !defined(FTP_HOST)
+#define        FTP_HOST        ftp.netbsd.org
+#endif
+
+#if !defined(FTP_DIR)
+#define        FTP_DIR         pub/NetBSD/NetBSD-
+#endif
+
+#define        STRING(x)       __STRING(x)
+
 EXTERN char ext_dir[STRSIZE] INIT("");
-EXTERN char ftp_host[STRSIZE] INIT("ftp.netbsd.org");
-EXTERN char ftp_dir[STRSIZE]  INIT("pub/NetBSD/NetBSD-");
+EXTERN char ftp_host[STRSIZE] INIT(STRING(FTP_HOST));
+EXTERN char ftp_dir[STRSIZE]  INIT(STRING(FTP_DIR));
 EXTERN char ftp_prefix[STRSIZE] INIT("/binary/sets");
 EXTERN char ftp_user[STRSIZE] INIT("ftp");
 EXTERN char ftp_pass[STRSIZE] INIT("");



Home | Main Index | Thread Index | Old Index