ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ozone/mgar/gar/category.mk
Revision: 1
Committed: Sat Jun 20 14:58:51 2026 UTC (4 weeks, 3 days ago) by operz
File size: 1442 byte(s)
Log Message:
Initial import of OZSW mgar build tree

File Contents

# User Rev Content
1 operz 1 # vim: ft=make ts=4 sw=4 noet
2     #
3     # This Makefile is the main entry point to GAR and is included by
4     # each package build description. As such, the file name 'category.mk'
5     # is slightly misleading and could be subject to future change.
6     #
7    
8     # Safety check, we need GNU make >= 3.81 for the magic further below,
9     # more precisly: 3.80 for $(MAKEFILE_LIST), 3.81 for $(lastword ...)
10     # c.f.: http://cvs.savannah.gnu.org/viewvc/make/NEWS?root=make&view=markup
11     ifeq (,$(and $(MAKEFILE_LIST),$(lastword test)))
12     define error_msg
13     GNU make >= 3.81 required.
14     Try "pkgutil -i OZSWgmake and prepend /opt/ozsw/bin to your $$PATH.
15     endef
16     $(error $(error_msg))
17     endif
18    
19     # Determine this file's directory, i.e. the GAR base directory. We
20     # need to do this dynamically as we don't want to rely on the presence
21     # of gar/ symlinks in each build directory.
22     GARDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
23    
24     $(if $(findstring $(CATEGORIES),apps devel lang lib net server utils xorg xtra),\
25     $(warning The categories with no special meaning have been renamed to 'default', please remove the CATEGORIES line as for the default case this is no longer necessary)\
26     )
27    
28     CATEGORIES ?= default
29    
30     ifeq (,$(wildcard $(GARDIR)/categories/$(CATEGORIES)/category.mk))
31     $(error The category '$(CATEGORIES)' is invalid. Valid categories are: $(patsubst $(GARDIR)/categories/%,%,$(wildcard $(GARDIR)/categories/*)))
32     endif
33    
34     include $(GARDIR)/categories/$(CATEGORIES)/category.mk