1 # Makefile for X Consolidation |
1 # Makefile for X Consolidation |
2 # |
2 # |
3 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
3 # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. |
4 # |
4 # |
5 # Permission is hereby granted, free of charge, to any person obtaining a |
5 # Permission is hereby granted, free of charge, to any person obtaining a |
6 # copy of this software and associated documentation files (the "Software"), |
6 # copy of this software and associated documentation files (the "Software"), |
7 # to deal in the Software without restriction, including without limitation |
7 # to deal in the Software without restriction, including without limitation |
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
32 OS_SUBDIRS_sparc = $(OS_SUBDIRS_common) |
32 OS_SUBDIRS_sparc = $(OS_SUBDIRS_common) |
33 OS_SUBDIRS_i386 = $(OS_SUBDIRS_common) |
33 OS_SUBDIRS_i386 = $(OS_SUBDIRS_common) |
34 |
34 |
35 all: setup install check |
35 all: setup install check |
36 |
36 |
37 setup: open-src/common/Makefile.options |
|
38 |
|
39 # Choose options for branding, download sites, etc. |
37 # Choose options for branding, download sites, etc. |
40 # Makefile.options is created as a link to a file containing the desired |
38 # Makefile.options is created as a link to a file containing the desired |
41 # options, chosen by the first of these found in open-src/common: |
39 # options, chosen by the first of these found in open-src/common: |
42 # 1) Makefile.options.$(X_BUILD_OPTIONS) |
40 # 1) Makefile.options.$(X_BUILD_OPTIONS) |
43 # 2) Makefile.options.<last two components of `domainname`, lowercased> |
41 # 2) Makefile.options.<last two components of `domainname`, lowercased> |
44 # 3) Makefile.options.opensolaris |
42 # 3) Makefile.options.opensolaris |
45 MK_OPTS = open-src/common/Makefile.options |
43 MK_OPTS = open-src/common/Makefile.options |
|
44 |
|
45 setup: $(MK_OPTS) |
46 |
46 |
47 $(MK_OPTS): |
47 $(MK_OPTS): |
48 @ if [[ -n "${X_BUILD_OPTIONS}" ]] ; then \ |
48 @ if [[ -n "${X_BUILD_OPTIONS}" ]] ; then \ |
49 X_BUILD_OPTIONS="${X_BUILD_OPTIONS}" ; \ |
49 X_BUILD_OPTIONS="${X_BUILD_OPTIONS}" ; \ |
50 if [[ ! -f "$(MK_OPTS).$${X_BUILD_OPTIONS}" ]] ; then \ |
50 if [[ ! -f "$(MK_OPTS).$${X_BUILD_OPTIONS}" ]] ; then \ |
67 # install & check are run in each subdir via Makefile.subdirs |
67 # install & check are run in each subdir via Makefile.subdirs |
68 |
68 |
69 ### Include common definitions |
69 ### Include common definitions |
70 DIRNAME="" |
70 DIRNAME="" |
71 include $(TOP)/open-src/common/Makefile.subdirs |
71 include $(TOP)/open-src/common/Makefile.subdirs |
|
72 |
|
73 # Files & directories to include in source release zip files |
|
74 ZIP_GENERATED_FILES = BUILD_INSTRUCTIONS.txt pkglist.txt |
|
75 ZIP_CONTENTS = $(ZIP_GENERATED_FILES) |
|
76 ZIP_CONTENTS += buildit download-tarballs make_release_packages Makefile |
|
77 ZIP_CONTENTS += open-src pkg exception_lists |
|
78 ZIP_CONTENTS += .hg .hgignore .hgtags |
|
79 |
|
80 ZIP_COMMENT_FILE = proto/x.zipcomment |
|
81 |
|
82 # Don't include Makefile.options symlink in zipfile, so it gets correctly |
|
83 # autogenerated for the builder when they first build it |
|
84 ZIP_EXCLUDE_FILES = $(MK_OPTS) |
|
85 |
|
86 proto/x.zip: $(ZIP_GENERATED_FILES) |
|
87 -rm -f proto/x.zip |
|
88 ( print 'Oracle Solaris X Consolidation open source release' ; \ |
|
89 LC_ALL=en_US.UTF-8 date ; \ |
|
90 print -n 'hg id: ' ; hg id -it ) > $(ZIP_COMMENT_FILE) |
|
91 zip -9rqyz proto/x.zip $(ZIP_CONTENTS) -x $(ZIP_EXCLUDE_FILES) \ |
|
92 < $(ZIP_COMMENT_FILE) |
|
93 |
|
94 BUILD_INSTRUCTIONS.txt: |
|
95 cd open-src && $(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) $(TOP)/$(@) |
|
96 |
|
97 pkglist.txt: |
|
98 cd pkg && $(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) $(TOP)/$(@) |