Add files from parent branch HEAD:
[pkgsrc.git] / mk / defs.Linux.mk
1 # $NetBSD: defs.Linux.mk,v 1.75 2004/08/27 06:29:09 jlam Exp $
2 #
3 # Variable definitions for the Linux operating system.
4
5 AWK?=           /usr/bin/awk
6 .if exists(/bin/basename)
7 BASENAME?=      /bin/basename
8 .elif exists(/usr/bin/basename)
9 BASENAME?=      /usr/bin/basename
10 .endif
11 CAT?=           /bin/cat
12 CHMOD?=         /bin/chmod
13 CHOWN?=         /bin/chown
14 CHGRP?=         /bin/chgrp
15 CMP?=           cmp
16 CP?=            /bin/cp
17 .if exists(/bin/cut)
18 CUT?=           /bin/cut
19 .else
20 CUT?=           /usr/bin/cut
21 .endif
22 DATE?=          /bin/date
23 DC?=            /usr/bin/dc
24 DIRNAME?=       /usr/bin/dirname
25 ECHO?=          echo                            # Shell builtin
26 ECHO_N?=        ${ECHO} -n
27 .if exists(/bin/egrep)
28 EGREP?=         /bin/egrep
29 .elif exists(/usr/bin/egrep)
30 EGREP?=         /usr/bin/egrep
31 .endif
32 EXPR?=          /usr/bin/expr
33 FALSE?=         false                           # Shell builtin
34 .if exists(/bin/fgrep)
35 FGREP?=         /bin/fgrep
36 .elif exists(/usr/bin/fgrep)
37 FGREP?=         /usr/bin/fgrep
38 .endif
39 FILE_CMD?=      /usr/bin/file
40 FIND?=          /usr/bin/find
41 .if exists(/usr/bin/make)
42 GMAKE?=         /usr/bin/make
43 _TOOLS_OPSYS_HAS_GNU.make+=     ${MACHINE_PLATFORM}
44 .else
45 GMAKE?=         ${LOCALBASE}/bin/gmake
46 .endif
47 .if exists(/bin/grep)
48 GREP?=          /bin/grep
49 .elif exists(/usr/bin/grep)
50 GREP?=          /usr/bin/grep
51 .endif
52 GTAR?=          /bin/tar
53 .if exists(/usr/bin/gunzip)
54 GUNZIP_CMD?=    /usr/bin/gunzip -f
55 .else
56 GUNZIP_CMD?=    /bin/gunzip -f
57 .endif
58 .if exists(/usr/bin/gzip)
59 GZIP_CMD?=      /usr/bin/gzip -nf ${GZIP}
60 .else
61 GZIP_CMD?=      /bin/gzip -nf ${GZIP}
62 .endif
63 GZCAT?=         /bin/zcat
64 GZIP?=          -9
65 .if exists(/bin/head)
66 HEAD?=          /bin/head
67 .else
68 HEAD?=          /usr/bin/head
69 .endif
70 HOSTNAME_CMD?=  /bin/hostname
71 ID?=            /usr/bin/id
72 IMAKE?=         ${X11BASE}/bin/imake ${IMAKEOPTS}
73 IMAKEOPTS+=     -DBuildHtmlManPages=NO
74 LDCONFIG?=      /sbin/ldconfig
75 LN?=            /bin/ln
76 LS?=            /bin/ls
77 M4?=            /usr/bin/m4
78 .if exists(/bin/mail)
79 MAIL_CMD?=      /bin/mail # RH, Mandrake
80 .else
81 MAIL_CMD?=      /usr/bin/mail # Debian, Slackware, SuSE
82 .endif
83 MKDIR?=         /bin/mkdir -p
84 MTREE?=         ${LOCALBASE}/sbin/mtree
85 MV?=            /bin/mv
86 .if exists(/bin/nice)
87 NICE?=          /bin/nice
88 .else
89 NICE?=          /usr/bin/nice
90 .endif
91 PATCH?=         /usr/bin/patch
92 PAX?=           ${LOCALBASE}/bin/pax
93 PERL5?=         ${LOCALBASE}/bin/perl
94 PKGLOCALEDIR?=  share
95 PS?=            /bin/ps
96 PWD_CMD?=       /bin/pwd        # needs to print physical path
97 RM?=            /bin/rm
98 RMDIR?=         /bin/rmdir
99 # XXX: default from bsd.pkg.defaults.mk.  Verify/corerct for this platform
100 # and remove this comment.
101 RSH?=           /usr/bin/rsh
102 .if exists(/bin/sed)
103 SED?=           /bin/sed
104 .elif exists(/usr/bin/sed)
105 SED?=           /usr/bin/sed
106 .endif
107 SETENV?=        /usr/bin/env
108 SH?=            /bin/sh
109 SHLOCK=         ${LOCALBASE}/bin/shlock
110 .if exists(/bin/sort)
111 SORT?=          /bin/sort
112 .else
113 SORT?=          /usr/bin/sort
114 .endif
115 SU?=            /bin/su
116 TAIL?=          /usr/bin/tail
117 TAR?=           ${LOCALBASE}/bin/tar
118 TEE?=           /usr/bin/tee
119 TEST?=          test                    # Shell builtin
120 .if exists(/bin/touch)
121 TOUCH?=         /bin/touch
122 .else
123 TOUCH?=         /usr/bin/touch
124 .endif
125 TR?=            /usr/bin/tr
126 TRUE?=          true                    # Shell builtin
127 TSORT?=         /usr/bin/tsort
128 TYPE?=          type                    # Shell builtin
129 WC?=            /usr/bin/wc
130 XARGS?=         /usr/bin/xargs -r
131
132 CPP_PRECOMP_FLAGS?=     # unset
133 DEF_UMASK?=             022
134 DEFAULT_SERIAL_DEVICE?= /dev/null
135 EXPORT_SYMBOLS_LDFLAGS?=        # Don't add symbols to the dynamic symbol table
136 GROUPADD?=              /usr/sbin/groupadd
137 MOTIF_TYPE_DEFAULT?=    openmotif       # default 2.0 compatible libs type
138 NOLOGIN?=               /bin/false
139 PKG_TOOLS_BIN?=         ${LOCALBASE}/sbin
140 ROOT_CMD?=              ${SU} - root -c
141 ROOT_GROUP?=            root
142 ROOT_USER?=             root
143 SERIAL_DEVICES?=        /dev/null
144 ULIMIT_CMD_datasize?=   ulimit -d `ulimit -H -d`
145 ULIMIT_CMD_stacksize?=  ulimit -s `ulimit -H -s`
146 ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
147 USERADD?=               /usr/sbin/useradd
148
149 # imake installs manpages in weird places
150 # these values from /usr/X11R6/lib/X11/config/linux.cf
151 IMAKE_MAN_SOURCE_PATH=  man/man
152 IMAKE_MAN_SUFFIX=       1x
153 IMAKE_LIBMAN_SUFFIX=    3x
154 IMAKE_KERNMAN_SUFFIX=   4
155 IMAKE_FILEMAN_SUFFIX=   5x
156 IMAKE_MISCMAN_SUFFIX=   7
157 IMAKE_MAN_DIR=          ${IMAKE_MAN_SOURCE_PATH}1
158 IMAKE_LIBMAN_DIR=       ${IMAKE_MAN_SOURCE_PATH}3
159 IMAKE_KERNMAN_DIR=      ${IMAKE_MAN_SOURCE_PATH}4
160 IMAKE_FILEMAN_DIR=      ${IMAKE_MAN_SOURCE_PATH}5
161 IMAKE_MISCMAN_DIR=      ${IMAKE_MAN_SOURCE_PATH}7
162 IMAKE_MANNEWSUFFIX=     ${IMAKE_MAN_SUFFIX}
163
164 _DO_SHLIB_CHECKS=       no      # on installation, fixup PLIST for shared libs
165 _IMAKE_MAKE=            ${MAKE} # program which gets invoked by imake
166 .if exists(/usr/include/netinet6) || exists(/usr/include/linux/in6.h)
167 _OPSYS_HAS_INET6=       yes     # IPv6 is standard
168 .else
169 _OPSYS_HAS_INET6=       no      # IPv6 is not standard
170 .endif
171 _OPSYS_HAS_JAVA=        no      # Java is not standard
172 _OPSYS_HAS_MANZ=        no      # no MANZ for gzipping of man pages
173 _OPSYS_HAS_OSSAUDIO=    no      # libossaudio is available
174 _OPSYS_PERL_REQD=               # no base version of perl required
175 _OPSYS_PTHREAD_AUTO=    no      # -lpthread needed for pthreads
176 _OPSYS_SHLIB_TYPE=      ELF/a.out       # shared lib type
177 _PATCH_CAN_BACKUP=      yes     # native patch(1) can make backups
178 _PATCH_BACKUP_ARG?=     -b -V simple -z # switch to patch(1) for backup suffix
179 _PREFORMATTED_MAN_DIR=  cat     # directory where catman pages are
180 _USE_GNU_GETTEXT=       no      # Don't use GNU gettext
181 _USE_RPATH=             yes     # add rpath to LDFLAGS
182
183 # flags passed to the linker to extract all symbols from static archives.
184 # this is GNU ld.
185 _OPSYS_WHOLE_ARCHIVE_FLAG=      -Wl,--whole-archive
186 _OPSYS_NO_WHOLE_ARCHIVE_FLAG=   -Wl,--no-whole-archive
187
188 .if !defined(DEBUG_FLAGS)
189 _STRIPFLAG_CC?=         -s      # cc(1) option to strip
190 _STRIPFLAG_INSTALL?=    -s      # install(1) option to strip
191 .endif
192
193 LOCALBASE?=             ${DESTDIR}/usr/pkg
194
195 # check for maximum command line length and set it in configure's environment,
196 # to avoid a test required by the libtool script that takes forever.
197 # FIXME: Adjust to work on this system and enable the lines below.
198 #.if defined(GNU_CONFIGURE) && defined(USE_LIBTOOL)
199 #_OPSYS_MAX_CMDLEN!=    /sbin/sysctl -n kern.argmax
200 #CONFIGURE_ENV+=                lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN}
201 #.endif
202
203 # If games are to be installed setgid, then SETGIDGAME is set to 'yes'
204 # (it defaults to 'no' as per bsd.pkg.defaults.mk).
205 # Set the group and mode to meaningful values in that case (defaults to
206 # BINOWN, BINGRP and BINMODE as per bsd.pkg.defaults.mk).
207 # FIXME: Adjust to work on this system and enable the lines below.
208 #.if !(empty(SETGIDGAME:M[yY][eE][sS]))
209 #GAMEOWN=               games
210 #GAMEGRP=               games
211 #GAMEMODE=              2555
212 #.endif