-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.49 KB
/
Makefile
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
include common.mk
install:
@echo Target ‘$@’ not implemented.
# ----------------------------------------------------------------------------
# Create symlinks in $HOME
# ----------------------------------------------------------------------------
SHELL_FILES =
SHELL_FILES += ~/.bash_profile
SHELL_FILES += ~/.bash_sessions_disable
SHELL_FILES += ~/.bashrc
SHELL_FILES += ~/.hushlogin
SHELL_FILES += ~/.profile
~/.bash_profile: bash/.bash_profile
~/.bash_sessions_disable: bash/.bash_sessions_disable
~/.bashrc: bash/.bashrc
~/.hushlogin: bash/.hushlogin
~/.profile: sh/.profile
$(SHELL_FILES):
ln -sfv .config/$< $@
shellfiles: $(SHELL_FILES)
# -----------------------------------------------------------------------------
# Send a fake user-agent string to mask the activity of tools like wget.
# ----------------------------------------------------------------------------
USER_AGENT_VER = 131.0
USER_AGENT = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:$(USER_AGENT_VER)) Gecko/20100101 Firefox/$(USER_AGENT_VER)
M4_OUTPUT_FILES = \
aria2/aria2.conf \
curl/.curlrc \
wget/wgetrc \
yt-dlp/config \
../.private/yt-dlp/config
M4FLAGS =
M4FLAGS += -D _HOME_="$(HOME)" # yt-dlp only
M4FLAGS += -D _XDG_CONFIG_HOME_="$(XDG_CONFIG_HOME)" # yt-dlp only
M4FLAGS += -D _XDG_CACHE_HOME_="$(XDG_CACHE_HOME)" # wget only
M4FLAGS += -D _USER_AGENT_="$(USER_AGENT)"
$(M4_OUTPUT_FILES): %: %.m4
m4 $(M4FLAGS) $< >$@
$(M4_OUTPUT_FILES): $(CURDIR)/Makefile
.PHONY: user-agent
user-agent: $(M4_OUTPUT_FILES)