2024-04-14 23:13:13 -05:00
|
|
|
DEFAULT_TARGETS += $(HOME)/.profile \
|
2024-01-06 05:38:53 -06:00
|
|
|
$(HOME)/.vim/bundle/Vundle.vim $(HOME)/.vimrc \
|
2024-04-25 07:50:43 +00:00
|
|
|
$(HOME)/.inputrc \
|
2024-04-14 22:28:49 -05:00
|
|
|
aliases \
|
2024-03-06 19:55:53 -06:00
|
|
|
$(HOME)/.profile.d profileds
|
2024-01-30 06:48:26 -06:00
|
|
|
ALIASES = $(foreach a,$(wildcard .aliases/*),$(subst .aliases/,$(HOME)/.aliases/,$(a)))
|
2024-02-15 05:00:03 -06:00
|
|
|
PROFILEDS = $(foreach p,$(wildcard .profile.d/*),$(subst .profile.d/,$(HOME)/.profile.d/,$(p)))
|
2024-01-06 05:38:53 -06:00
|
|
|
|
2024-04-14 23:13:13 -05:00
|
|
|
UNAME = $(shell uname -s)
|
2024-01-06 05:38:53 -06:00
|
|
|
ifeq ($(UNAME),Darwin)
|
2024-04-14 23:13:13 -05:00
|
|
|
DEFAULT_TARGETS += /opt/local/etc/bashrc.mac \
|
2024-01-06 05:38:53 -06:00
|
|
|
/opt/local/etc/bashrc
|
|
|
|
|
PROFILE = .profile.mac
|
2024-04-14 23:13:13 -05:00
|
|
|
INSTALL = ginstall
|
2024-04-14 23:53:09 -05:00
|
|
|
OPEN = open
|
2024-04-14 23:50:10 -05:00
|
|
|
else ifeq ($(UNAME),FreeBSD)
|
2024-04-25 07:42:47 +00:00
|
|
|
DEFAULT_TARGETS += $(HOME)/.bashrc \
|
|
|
|
|
$(HOME)/.bashrc.freebsd
|
2024-04-14 23:13:13 -05:00
|
|
|
PROFILE = .profile
|
|
|
|
|
INSTALL = ginstall
|
2024-04-14 23:53:09 -05:00
|
|
|
OPEN = xdg-open
|
2024-01-06 05:38:53 -06:00
|
|
|
else
|
2024-04-14 23:13:13 -05:00
|
|
|
DEFAULT_TARGETS += $(HOME)/.bashrc
|
2024-01-06 05:38:53 -06:00
|
|
|
PROFILE = .profile
|
2024-04-14 23:13:13 -05:00
|
|
|
INSTALL = install
|
2024-04-14 23:53:09 -05:00
|
|
|
OPEN = xdg-open
|
2024-01-06 05:38:53 -06:00
|
|
|
endif
|
|
|
|
|
|
2024-04-14 23:13:13 -05:00
|
|
|
install: $(DEFAULT_TARGETS)
|
2024-01-06 05:38:53 -06:00
|
|
|
|
2024-04-13 21:32:02 -05:00
|
|
|
$(HOME)/.aliases/%: .aliases/%
|
2024-04-14 23:13:13 -05:00
|
|
|
$(INSTALL) -D -m 644 $< $@
|
2024-01-06 05:38:53 -06:00
|
|
|
|
|
|
|
|
aliases: $(ALIASES)
|
|
|
|
|
|
2024-02-15 05:00:03 -06:00
|
|
|
$(HOME)/.profile.d:
|
|
|
|
|
mkdir $@
|
|
|
|
|
|
|
|
|
|
$(HOME)/.profile.d/%: .profile.d/% $(HOME)/.profile.d
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
|
|
profileds: $(PROFILEDS)
|
|
|
|
|
|
2024-01-06 05:38:53 -06:00
|
|
|
$(HOME)/.profile: $(PROFILE)
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
2024-04-05 22:02:13 -05:00
|
|
|
$(HOME)/.bashrc: .bashrc
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
2024-04-25 07:48:32 +00:00
|
|
|
$(HOME)/.inputrc: .inputrc
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
2024-04-25 07:42:47 +00:00
|
|
|
$(HOME)/.bashrc.freebsd: .bashrc.freebsd
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
2024-01-06 05:38:53 -06:00
|
|
|
/opt/local/etc/bashrc: .bashrc
|
|
|
|
|
sudo cp $< $@
|
|
|
|
|
|
|
|
|
|
/opt/local/etc/bashrc.mac: .bashrc.mac
|
|
|
|
|
sudo cp $< $@
|
|
|
|
|
|
|
|
|
|
$(HOME)/.vimrc: .vimrc
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
|
|
$(HOME)/.vim/bundle:
|
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
|
|
$(HOME)/.vim/bundle/Vundle.vim: $(HOME)/.vim/bundle
|
2024-02-16 07:13:15 -06:00
|
|
|
git clone https://github.com/VundleVim/Vundle.vim.git $@ || cd $@; git pull; exit 0
|
2024-01-06 05:38:53 -06:00
|
|
|
|
2024-04-14 23:53:09 -05:00
|
|
|
.PHONY: aliases profileds README
|
|
|
|
|
|
|
|
|
|
### README #####################################################################
|
|
|
|
|
|
|
|
|
|
pub.css:
|
|
|
|
|
wget https://github.com/manuelp/pandoc-stylesheet/raw/acac36b976966f76544176161ba826d519b6f40c/pub.css
|
|
|
|
|
|
|
|
|
|
# Requires Pandoc to be installed
|
|
|
|
|
README.html: README.md pub.css
|
|
|
|
|
pandoc $< -s -c pub.css -o README.html
|
|
|
|
|
$(OPEN) README.html
|
|
|
|
|
|
|
|
|
|
README: README.html
|