19 |
19 |
20 For each module, at build time the tarball is unpacked, patches applied for |
20 For each module, at build time the tarball is unpacked, patches applied for |
21 post-release bug fixes or customizations, and then the build is run. |
21 post-release bug fixes or customizations, and then the build is run. |
22 |
22 |
23 To allow building both 32-bit and 64-bit versions in the same build, |
23 To allow building both 32-bit and 64-bit versions in the same build, |
24 this all happens in subdirectories named build_32 & build_64 in each |
24 and building both sparc and x86 versions in the same tree, this all |
25 modules' directory. Since those subdirectories are competely recreatable |
25 happens in subdirectories named build-amd64, build-i386, build-sparc, |
26 from the source tarball and patches, rebuilding the tree or running make clean |
26 and build-sparcv9 in each modules' directory. Since those subdirectories |
27 simply removes them entirely and recreates them. |
27 are competely recreatable from the source tarball and patches, rebuilding the |
|
28 tree or running make clean simply removes them entirely and recreates them. |
|
29 Note that some modules, especially the fonts, use different build-* patterns |
|
30 for the variants they build, and thus trying to have both sparc & x86 |
|
31 platforms building in the same directory at the same time will likely fail |
|
32 as they stomp on each other in those directories. Running one build then |
|
33 the other should work. |
28 |
34 |
29 You should be able to run make commands in any module directory or |
35 You should be able to run make commands in any module directory or |
30 module-type directory, though since most of the intermodule dependencies |
36 module-type directory, though since most of the intermodule dependencies |
31 are not declared, many modules will break unless you've done a full-tree |
37 are not declared, many modules will break unless you've done a full-tree |
32 build at some point to populate the proto area with the bits needed. |
38 build at some point to populate the proto area with the bits needed. |
87 current tarball. Useful when updating to a new version and patches |
93 current tarball. Useful when updating to a new version and patches |
88 still apply, but you want to get rid of warnings about patch fuzz |
94 still apply, but you want to get rid of warnings about patch fuzz |
89 and line offsets. |
95 and line offsets. |
90 |
96 |
91 make git-update |
97 make git-update |
92 See "Building from git" section below. |
98 See "Building from git" section below. |
|
99 |
|
100 make manifest |
|
101 Run the make install rules with DESTDIR set to a temporary directory, |
|
102 and then generate a pkg manifest in pkg/manifests/$(MODULE_PKGNAME).mf |
|
103 that includes all the installed files. If a manifest already exists |
|
104 there, this merges changes with the existing manifest so that you can |
|
105 update when upgrading to a new upstream release. |
93 |
106 |
94 ============================================================================= |
107 ============================================================================= |
95 |
108 |
96 Make targets you can build in parent directories: |
109 Make targets you can build in parent directories: |
97 ------------------------------------------------- |
110 ------------------------------------------------- |
139 - Name of the module being built - usually the same as the name of the |
152 - Name of the module being built - usually the same as the name of the |
140 directory it's being built in and the tarball used for the sources. |
153 directory it's being built in and the tarball used for the sources. |
141 |
154 |
142 MODULE_VERSION |
155 MODULE_VERSION |
143 - Version of the source to use, used by default in the tarball name and |
156 - Version of the source to use, used by default in the tarball name and |
144 source directory unpacked from it. |
157 source directory unpacked from it. Also exported to the package |
|
158 attributes as __version:$(MODULE_NAME)__ for use in package manifests. |
145 - Special values: |
159 - Special values: |
146 "git" - see "Building from git" below |
160 "git" - see "Building from git" below |
147 "src" - used when there is no upstream tarball, only local sources |
161 "src" - used when there is no upstream tarball, only local sources |
148 "NONE" - used when no build_* directories are created |
162 "NONE" - used when no build_* directories are created |
149 |
163 |
150 Required for some modules: |
164 Required for some modules: |
151 |
|
152 SUN_PACKAGE |
|
153 - Package name that this module is shipped in, to list in attributes section |
|
154 of man page |
|
155 * Required if SUNTOUCHED_MANPAGES is not empty |
|
156 |
165 |
157 MODULE_STABILITY |
166 MODULE_STABILITY |
158 - Interface Stability to list in attributes section of man page |
167 - Interface Stability to list in attributes section of man page |
159 * Required if SUNTOUCHED_MANPAGES is not empty |
168 * Required if SUNTOUCHED_MANPAGES is not empty |
160 |
169 |
191 Available flags are: |
200 Available flags are: |
192 -a '{attribute, value}, ...' - entries for Attributes section table |
201 -a '{attribute, value}, ...' - entries for Attributes section table |
193 -l libname - add library line to synopsis |
202 -l libname - add library line to synopsis |
194 -p path - add path to command in synopsis |
203 -p path - add path to command in synopsis |
195 |
204 |
|
205 MODULE_ARC_CASES |
|
206 - ARC cases that covered this module, both for future reference by engineers |
|
207 and for publication in opensolaris.arc_url metadata attributes in packages. |
|
208 Must be in the format "ARC/year/case", such as "PSARC/2004/187". |
|
209 |
196 FIX_PC_FILES |
210 FIX_PC_FILES |
197 - Names of pkgconfig .pc or .pc.in files in the module, which will be |
211 - Names of pkgconfig .pc or .pc.in files in the module, which will be |
198 "fixed" to add required -R flags for linking libraries with and remove |
212 "fixed" to add required -R flags for linking libraries with and remove |
199 unnecessary Requires.privates lines from. |
213 unnecessary Requires.privates lines from. |
200 |
214 |
278 |
292 |
279 MODULE_INSTALL_MAKEFLAGS |
293 MODULE_INSTALL_MAKEFLAGS |
280 - Additional command line arguments passed when calling make |
294 - Additional command line arguments passed when calling make |
281 by default_install |
295 by default_install |
282 |
296 |
283 EXTRA_LICENSES |
297 MODULE_X11_BINCOMPAT_LINKS |
284 - Additional files containing copyright & license information for this module, |
298 MODULE_X11_LIBCOMPAT_LINKS |
285 beyond what's in LICENSE_FILE, such as subsets for specific packages. |
299 - For binaries previously delivered in /usr/X11/bin or libraries previously |
286 Will be copied under their own names to $(PROTODIR)/licenses/<path>/ |
300 delivered in /usr/X11/lib (or their /usr/openwin predecessors), set these |
287 for use by include statements in package copyright.add files, where |
301 to the basenames of files to link from each of those directories to |
288 path is the same as the directory & subdirectory the module source is in. |
302 /usr/lib & /usr/bin. For libraries, be sure to include both the .so and |
289 Files are looked for relative to module directory, include $(SOURCE_DIR)/ |
303 the .so.* names, if both are still delivered. |
290 in the filename to look relative to the top-level source directory. |
|
291 |
304 |
292 Optional, with non-empty default: |
305 Optional, with non-empty default: |
293 |
306 |
294 * Important, for these, to override the default values, you must not only |
307 * Important, for these, to override the default values, you must not only |
295 set the variable, but set another variable <variable>_SET=yes before the |
308 set the variable, but set another variable <variable>_SET=yes before the |
296 Makefile.inc is included to prevent the default from being set. For |
309 Makefile.inc is included to prevent the default from being set. For |
297 example: |
310 example: |
298 SOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME) |
311 SOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME) |
299 SOURCE_URL_SET=yes |
312 SOURCE_URL_SET=yes |
300 |
313 |
|
314 MODULE_PKGNAME |
|
315 - IPS/pkg(5) package name that this module is shipped in. Used in |
|
316 attributes section of man page, when generating manifests, and for |
|
317 delivering license and other metadata from the build to the package. |
|
318 Default: $(MODTYPE_PKGHIER)/$(MODULE_NAME), translated to lowercase |
|
319 |
|
320 MODULE_PKGCLASS |
|
321 - IPS/pkg(5) package classification that the package should be listed |
|
322 under in the Package Manager GUI. Must be one of the values defined |
|
323 by the GUI, which are listed in src/gui/data/opensolaris.org.sections |
|
324 in the pkg gate. Published in package metadata as the info.classification |
|
325 tag for the package. |
|
326 Default: System/X11 |
|
327 |
|
328 UPSTREAM |
|
329 - Name of the upstream source of this module, or "NONE" |
|
330 Published in package metadata as the info.upstream tag for the package. |
|
331 Default: X.Org Foundation |
|
332 |
|
333 UPSTREAM_URL |
|
334 - URL of the web site of the upstream source of this module |
|
335 Published in package metadata as the info.upstream_url tag for the package. |
|
336 Default: http://www.x.org/ |
|
337 |
301 MODULE_COMPILER |
338 MODULE_COMPILER |
302 - Compiler to use, either "suncc" or "gcc". |
339 - Compiler to use, either "suncc" or "gcc". |
303 Default: $(DEFAULT_COMPILER) setting in common/Makefile.init, |
340 Default: $(DEFAULT_COMPILER) setting in common/Makefile.init, |
304 which is set to suncc in the master sources. |
341 which is set to suncc in the master sources. |
305 |
342 |
308 Default: "$(MAKE)" (which is assumed to be Solaris make, not GNU). |
345 Default: "$(MAKE)" (which is assumed to be Solaris make, not GNU). |
309 |
346 |
310 MODULE_PREFIX |
347 MODULE_PREFIX |
311 - Prefix to install files under, passed to configure scripts via --prefix. |
348 - Prefix to install files under, passed to configure scripts via --prefix. |
312 Default: $(X11_DIR) (aka /usr). |
349 Default: $(X11_DIR) (aka /usr). |
|
350 |
|
351 MODULE_DOC_DIR |
|
352 - Directory to install documentation under |
|
353 Default: $(MODTYPE_DOC_DIR) if it is set, otherwise |
|
354 $(MODULE_PREFIX)/share/doc/$(MODULE_NAME) |
313 |
355 |
314 SOURCE_DIRNAME |
356 SOURCE_DIRNAME |
315 - Directory that will be created when the source tarball is unpacked. |
357 - Directory that will be created when the source tarball is unpacked. |
316 Default: $(MODULE_NAME)-$(MODULE_VERSION) |
358 Default: $(MODULE_NAME)-$(MODULE_VERSION) |
317 |
359 |
357 will be run. |
400 will be run. |
358 Default: $(SOURCE_DIR)/Makefile |
401 Default: $(SOURCE_DIR)/Makefile |
359 |
402 |
360 LICENSE_FILE |
403 LICENSE_FILE |
361 - File containing copyright & license information for this module. |
404 - File containing copyright & license information for this module. |
362 Will be copied to $(PROTODIR)/licenses/<path>/COPYING |
405 Will be copied to $(MODULE_PKG_METADATA_DIR) and added as a license |
363 for use by include statements in package copyright.add files, where |
406 action to the package. |
364 path is the same as the directory & subdirectory the module source is in. |
|
365 File is looked for first in module directory, if not found there, |
407 File is looked for first in module directory, if not found there, |
366 in top-level source directory (SOURCE_DIR). |
408 in top-level source directory (SOURCE_DIR). |
367 Default: COPYING |
409 Default: COPYING |
|
410 |
|
411 MODULE_LICENSE |
|
412 - Name of the license. See the "license" attribute in pkg(5) for details. |
|
413 Must be unique for each license aggregated into a package, so if two |
|
414 upstream modules with different license texts are delivered into the |
|
415 same package, they cannot both have the license name "MIT License", which |
|
416 is why our default string includes the package name to disambiguate. |
|
417 Default: MIT License ($(MODULE_NAME)) |
368 |
418 |
369 MODULE_MTLEVEL |
419 MODULE_MTLEVEL |
370 - For modules in the lib directory, Multi-thread safety level to list in |
420 - For modules in the lib directory, Multi-thread safety level to list in |
371 attributes section of SUNTOUCHED_MANPAGES |
421 attributes section of SUNTOUCHED_MANPAGES |
372 Default: See XInitThreads(3X11) |
422 Default: See XInitThreads(3X11) |
461 specify on the command line) and tries to isolate out just the |
512 specify on the command line) and tries to isolate out just the |
462 build errors for easier reading than the raw build logs. |
513 build errors for easier reading than the raw build logs. |
463 If you did buildit -p, also shows packaging errors. |
514 If you did buildit -p, also shows packaging errors. |
464 |
515 |
465 xmake - when you change one file in a large module like xserver and just |
516 xmake - when you change one file in a large module like xserver and just |
466 want to rebuild in that subdirectory of the build_32 or build_64 |
517 want to rebuild in that subdirectory of the build-<platform> |
467 tree, running xmake will attempt to run make or gmake in that |
518 tree, running xmake will attempt to run make or gmake in that |
468 directory with the same flags and environment variables that would |
519 directory with the same flags and environment variables that would |
469 be passed from running make in the module make directory |
520 be passed from running make in the module make directory |
|
521 |
|
522 xmake can also be used in higher level directories of the tree |
|
523 where it will call dmake with the correct options for parallel |
|
524 builds. |
470 |
525 |
471 ============================================================================= |
526 ============================================================================= |
472 |
527 |
473 Building from git: |
528 Building from git: |
474 |
529 |
492 |
547 |
493 Known deficiencies (aka TODO): |
548 Known deficiencies (aka TODO): |
494 |
549 |
495 Things we should fix someday, but haven't had time to do yet, include: |
550 Things we should fix someday, but haven't had time to do yet, include: |
496 |
551 |
497 - Builds are slow. Painfully slow. Things we might be able to do to |
552 - Builds are slower than they could be. Things we might be able to do to |
498 speed them up include: |
553 speed them up include: |
499 - Using a cache of configure script results shared among all the |
554 - Using a cache of configure script results shared among all the |
500 components in the tree |
555 components in the tree |
501 - Setting up proper parallel make rules so that multi-core/cpu |
|
502 machines can build more than one bit at a time. |
|
503 - Profiling the builds to see where bottlenecks are |
556 - Profiling the builds to see where bottlenecks are |
504 |
557 |
505 - There aren't dependency relationships listed in most of the module |
558 - There aren't dependency relationships listed in most of the module |
506 makefiles - you can't bringover the tree and just cd open-src/xserver/xorg |
559 makefiles - you can't bringover the tree and just cd open-src/xserver/xorg |
507 and make, because it won't find many of the dependencies - pretty much you |
560 and make, because it won't find many of the dependencies - pretty much you |
511 dependencies will probably take a while - getting them done for xserver/xorg |
564 dependencies will probably take a while - getting them done for xserver/xorg |
512 first would be most useful. |
565 first would be most useful. |
513 |
566 |
514 ============================================================================= |
567 ============================================================================= |
515 |
568 |
516 Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. |
569 Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. |
517 |
570 |
518 Permission is hereby granted, free of charge, to any person obtaining a |
571 Permission is hereby granted, free of charge, to any person obtaining a |
519 copy of this software and associated documentation files (the "Software"), |
572 copy of this software and associated documentation files (the "Software"), |
520 to deal in the Software without restriction, including without limitation |
573 to deal in the Software without restriction, including without limitation |
521 the rights to use, copy, modify, merge, publish, distribute, sublicense, |
574 the rights to use, copy, modify, merge, publish, distribute, sublicense, |