~dricottone/my-utils

ref: ef6d4cd1b378cc0ebbcb6e1460b3909f0cdd71b6 my-utils/Makefile -rw-r--r-- 1.8 KiB
ef6d4cd1Dominic Ricottone Incomplete work on hardware/media utils 4 days ago
                                                                                
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
56
57
58
59
60
61
62
63
BIN_DIR?=/usr/local/bin
LIB_DIR?=/usr/local/lib
COMP_DIR?=/usr/local/etc/bash_completion.d

.PHONY: install uninstall test clean

define subdir_make
	cd $(1) && BIN_DIR=$(BIN_DIR) LIB_DIR=$(LIB_DIR) COMP_DIR=$(COMP_DIR) make $(2)
	@echo ""
endef

install:
	$(call subdir_make,core,install)
	$(call subdir_make,archives,install)
	$(call subdir_make,containers,install)
	$(call subdir_make,display,install)
	$(call subdir_make,documents,install)
	$(call subdir_make,emulation,install)
	$(call subdir_make,games,install)
	$(call subdir_make,images,install)
	$(call subdir_make,network,install)
	$(call subdir_make,sound,install)
	$(call subdir_make,videos,install)

uninstall:
	$(call subdir_make,core,uninstall)
	$(call subdir_make,archives,uninstall)
	$(call subdir_make,containers,uninstall)
	$(call subdir_make,display,uninstall)
	$(call subdir_make,documents,uninstall)
	$(call subdir_make,emulation,uninstall)
	$(call subdir_make,games,uninstall)
	$(call subdir_make,images,uninstall)
	$(call subdir_make,network,uninstall)
	$(call subdir_make,sound,uninstall)
	$(call subdir_make,videos,uninstall)

test: clean
	$(call subdir_make,core,test)
	$(call subdir_make,archives,test)
	$(call subdir_make,containers,test)
	$(call subdir_make,display,test)
	$(call subdir_make,documents,test)
	$(call subdir_make,emulation,test)
	$(call subdir_make,games,test)
	$(call subdir_make,images,test)
	$(call subdir_make,network,test)
	$(call subdir_make,sound,test)
	$(call subdir_make,videos,test)

clean:
	$(call subdir_make,core,clean)
	$(call subdir_make,archives,clean)
	$(call subdir_make,containers,clean)
	$(call subdir_make,display,clean)
	$(call subdir_make,documents,clean)
	$(call subdir_make,emulation,clean)
	$(call subdir_make,games,clean)
	$(call subdir_make,images,clean)
	$(call subdir_make,network,clean)
	$(call subdir_make,sound,clean)
	$(call subdir_make,videos,clean)