component(developer/golang-123): Add Component
[oi-userland.git] / components / x11 / x11-gate / Makefile
blobc7ada2864f39df5c0c75c5827e5eb225c95cebdd
1 include ../../../make-rules/shared-macros.mk
3 X11_GATE_DIR=$(WS_TOP)/components/x11
4 X11_GATE_COOKIE=.x11.installed
5 X11_GATE_INSTALL_ACTION=!install
7 FULL_BUILD?=1
9 ifeq ($(FULL_BUILD), 1)
10 include components.mk
11 else
12 include xorg.mk
13 endif
15 clobber:
16 @for d in $(COMPONENTS); \
17 do \
18 if [ "$$d"X != "$(X11_GATE_INSTALL_ACTION)X" ]; \
19 then cd $(X11_GATE_DIR)/$$d && gmake clobber && rm -f $(X11_GATE_COOKIE) && cd -; \
20 fi; \
21 done;
23 publish:
24 @typeset -i i=0;\
25 for d in $(COMPONENTS); \
26 do \
27 if test -d $(X11_GATE_DIR)/$$d; \
28 then \
29 echo "Entering: $$d"; \
30 if test ! -f $(X11_GATE_DIR)/$$d/$(X11_GATE_COOKIE); \
31 then \
32 cd $(X11_GATE_DIR)/$$d && gmake clobber \
33 && gmake env-prep && gmake publish \
34 && touch $(X11_GATE_COOKIE); \
35 if test -f $(X11_GATE_COOKIE); \
36 then echo "SUCCESS: $$d"; cd -; \
37 else echo "FAILURE: $$d"; exit 1; fi; \
38 ((i=i+1));\
39 fi;\
40 elif [ "$$d"X = "$(X11_GATE_INSTALL_ACTION)X" ]; \
41 then \
42 if (( i > 0 )); \
43 then \
44 echo "$(X11_GATE_INSTALL_ACTION) $$i packages" && pfexec pkg update --no-backup-be ; \
45 ((i = 0)); \
46 fi;\
47 else \
48 echo "Error: $$d does not exist"; \
49 exit; \
50 fi; \
51 done;
53 REQUIRED_PACKAGES:
54 @cat $(X11_GATE_DIR)/*/Makefile| grep 'REQUIRED_PACKAGES +=' | gsort --uniq | gsed '/x11/d'