summaryrefslogtreecommitdiff
path: root/debian/patches/03_optional-progs-and-install.patch
blob: 97d8d5fd2c43a204512d02ae583f4e5089a59413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Allow the programs that are to be built to be defined in the build
configuration.

Provide an install target for installing the programs in $(INSTALL_DIR)/bin.

This patch by Thierry Reding.
Not submitted to Mesa.
--
Also remove references to GLU library since it is not required
and we don't actually build it at this point.


Index: mesa/progs/xdemos/Makefile
===================================================================
--- mesa.orig/progs/xdemos/Makefile
+++ mesa/progs/xdemos/Makefile
@@ -10,7 +10,7 @@
 
 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
 
-PROGS = \
+PROGS ?= \
 	corender \
 	glsync \
 	glthreads \
@@ -63,6 +63,11 @@
 extra: $(EXTRA_PROGS)
 
 
+install: $(PROGS)
+	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/bin
+	$(INSTALL) -m 755 $(PROGS) $(DESTDIR)$(INSTALL_DIR)/bin
+
+
 clean:
 	-rm -f $(PROGS) $(EXTRA_PROGS)
 	-rm -f *.o *~
Index: mesa/progs/Makefile
===================================================================
--- mesa.orig/progs/Makefile
+++ mesa/progs/Makefile
@@ -21,8 +21,12 @@
 		fi \
 	done
 
-# Dummy install target
 install:
+	@for dir in $(SUBDIRS) ; do \
+		if [ -d $$dir ] ; then \
+			(cd $$dir ; $(MAKE) install) ; \
+		fi \
+	done
 
 clean:
 	@list='$(SUBDIRS)'; for dir in $$list tests ; do \