Check-in [96b07b8c80]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revert 2ecd1a1c6e
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:96b07b8c800b1a4730fb64888710e67645599733
User & Date: cfuhrman 2015-01-27 23:33:05
Context
2015-01-27
23:34
Switch to using GNUmakefile Since the Makefile present only works with GNU make, rename it as appropriate. check-in: e34e48a091 user: cfuhrman tags: trunk, v2015.01.1
23:33
Revert 2ecd1a1c6e check-in: 96b07b8c80 user: cfuhrman tags: trunk
22:49
Switch to using GNUmakefile Since the Makefile present only works with GNU make, rename it as appropriate. check-in: 2ecd1a1c6e user: cfuhrman tags: trunk, v2015.01
Changes

Deleted GNUmakefile.

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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
#
# GNUmakefile
#
# Common targets:
#
#   all         : push out to all machines
#   install     : install ShellPAK locally, while building Emacs packages
#   update      : Same as install, but does not auto-build Emacs packages
#   dist        : create a shellpak tarball
#   clean       : cleans up various files in source directory
#   clean-elc   : Remove all top-level *.elc files from ~/.emacs.d
#   clean-all   : clean + clean-elc + clean-xkcd + clean-tags
#   uninstall   : Removes ShellPAK via `shellpak -u`
#
# Documentation targets:
#
#   docbook     : Generate PDF documentation using docbook (org-mode < 8)
#   html        : Generate HTML-formatted documentation
#   markdown    : Generate markdown-formatted documentation (org-mode >= 8)
#   pdf         : Generate PDF documentation using LaTeX
#   txt         : Generate plain-text documentation (UTF-8 encoding when available)
#   texinfo     : Generate PDF documentation using texinfo (org-mode >= 8)
#

#
# Variables
#

SHELLDIR=SHELL

SUBDIRS+=docs
SUBDIRS+=emacs.d
SUBDIRS+=hosts

CLEANDIRS=$(SUBDIRS:%=clean-%)

# Documentation variables
DOCDIRS+=docs
HTMDIRS=$(DOCDIRS:%=html-%)
PDFDIRS=$(DOCDIRS:%=pdf-%)
TXTDIRS=$(DOCDIRS:%=txt-%)
MDDIRS=$(DOCDIRS:%=markdown-%)
DBKDIRS=$(DOCDIRS:%=docbook-%)
TXIDIRS=$(DOCDIRS:%=texinfo-%)

# Host targets
LOCALHOSTS=
# REMOTEHOSTS=shell.example.com
REMOTEHOSTS=
PUBLICCO=../public/

# Determine distribution file.  These lines will produce spewage if
# this isn't a fossil checkout
FOSSIL_BRANCH=$(shell fossil info | grep "^tags" | awk -F\: '{print $$2}' | sed 's/ //g' | awk -F\, '{print $$NF}')
FOSSIL_REPO=${HOME}/repos/public.fossil
CKOUT_DATE=$(shell fossil info | grep "^checkout" | awk '{ print $$3 }' | sed 's/[-: ]//g')
DISTFILE=shellpak-${FOSSIL_BRANCH}-${CKOUT_DATE}.tar.gz
DISTEXCLUDES=--exclude=.fslckout --exclude=_FOSSIL_ --exclude=.AppleDouble --exclude=config --exclude=ext

# Command options
EMACS=emacs
EMACS_INIT=${HOME}/.emacs.d/init.el
EMACS_INSTALL_PACKAGES=cmf-autoinstall-packages
RSYNC=rsync
RSYNC_EXCLUDE=global-excludes
RSYNC_OPTS=-Ccavz --exclude='svn-commit*' --exclude='.AppleDouble' --exclude='*~' --exclude-from=${RSYNC_EXCLUDE} --delete
RSYNC_CONN_OPTS=-e ssh
RSYNC_PUBLIC_OPTS=-Ccavz --exclude=GPATH --exclude=GRTAGS --exclude=GTAGS --exclude=docs/*.txt \
  --exclude=.fslckout --exclude=config --exclude=ext --exclude='.AppleDouble' --exclude='*~' \
  --exclude=_FOSSIL_ --exclude=VERSION --delete

SSH=ssh
SSH_SETUP_CMD="cd ${SHELLDIR} ; ./setup.sh"

TAR=$(shell if [ `uname` != "Darwin" ] && type gtar >/dev/null; then echo 'gtar'; else echo 'tar'; fi)
DRYRUN_OPT=$(shell if echo ${DRYRUN} | egrep '[Yy][Ee][Ss]' >/dev/null ; then echo -n '-r'; fi)

#
# Targets
#

all: install local remote
	@echo 'All known hosts updated'

# Convenience target
install: txt setup.sh
	@echo 'Executing setup.sh for ShellPAK installation'
	@setup.sh ${DRYRUN_OPT} -p

uninstall: setup.sh VERSION
	@echo -n 'Removing ShellPAK '
	@cat VERSION
	@setup.sh ${DRYRUN_OPT} -u

update: txt setup.sh
	@echo 'Executing setup.sh for ShellPAK update'
	@setup.sh ${DRYRUN_OPT}

tags: gtags

# Note that this target may not work as expected when used on a case
# insensitive file system (e.g., default HFS+ Apple file system)
gtags:
	@echo 'Generating tags using global(1)'
	@gtags

local: ${LOCALHOSTS}
	@echo 'All local hosts updated'

remote: ${REMOTEHOSTS} ${POLARHOSTS}
	@echo 'All remote hosts updated'

emacs-packages:
	${EMACS} --batch -l ${EMACS_INIT} -f ${EMACS_INSTALL_PACKAGES}

clean : clean-echo ${CLEANDIRS} clean-dist
	@rm -vf *.bak
	@rm -vf *~
	@rm -vf *-baseline
	@rm -vf *-merge
	@rm -vf *-original

clean-echo:
	@echo 'Cleaning old files:'

clean-elc: clean-home-elc

clean-home-elc:
	@echo 'Removing installed elc files:'
	@rm -vf ${HOME}/.emacs.d/*.elc
	@rm -vf ${HOME}/.emacs.d/*~

clean-xkcd :
	@echo 'Removing left-over xkcd comics:'
	@rm -rvf ${HOME}/.emacs.d/xkcd/*

clean-tags : clean-gtags

clean-gtags :
	@rm -vf GPATH GTAGS GRTAGS

clean-all : clean clean-elc clean-xkcd clean-tags

clean-dist: 
	@rm -vf shellpak*.tar.gz
	@rm -rvf shellpak

# WARNING: Will remove *all* installed packages.  Use with care!
clean-elpa: clean-elc
	@rm -rvf ${HOME}/.emacs.d/elpa/*

public:
	@echo 'Syncing with public repository'
	${RSYNC} ${RSYNC_PUBLIC_OPTS} . ${PUBLICCO}

# Target for importing changes from public Fossil repository
git-import: .git
	@echo 'Importing changes from Fossil'
	fossil export --git ${FOSSIL_REPO} | \
          sed 's/^committer cfuhrman <cfuhrman>/committer Christopher M. Fuhrman <cfuhrman@pobox.com>/g' | \
          git fast-import
	git reset --hard trunk

dist: ${DISTFILE}

version: VERSION

VERSION:
	@fossil info | grep "^checkout" | awk '{ printf "[%s] %s %s", substr($$2, 0, 10), $$3, $$4 }' > VERSION

subdirs: ${SUBDIRS}
${SUBDIRS} :
	${MAKE} -C $@

${CLEANDIRS} :
	${MAKE} -C $(@:clean-%=%) clean

# Binary targets
emacs:
	@which emacs >/dev/null


#
# Documentation Targets
#

docbook : emacs ${DBKDIRS}
${DBKDIRS} :
	${MAKE} -C $(@:docbook-%=%) docbook

html : emacs ${HTMDIRS}
${HTMDIRS} :
	${MAKE} -C $(@:html-%=%) html

markdown : emacs ${MDDIRS}
${MDDIRS} :
	${MAKE} -C $(@:markdown-%=%) markdown

pdf : emacs ${PDFDIRS}
${PDFDIRS} :
	${MAKE} -C $(@:pdf-%=%) pdf

txt : emacs ${TXTDIRS}
${TXTDIRS} :
	${MAKE} -C $(@:txt-%=%) txt

texinfo : emacs ${TXIDIRS}
${TXIDIRS} :
	${MAKE} -C $(@:texinfo-%=%) texinfo


#
# Host Targets
#

${LOCALHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

${REMOTEHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

# Note: This target requires a tar that supports '--exclude' option,
# such as GNU tar
${DISTFILE}: clean clean-tags txt version
	@if [[ test -f .fslckout || test -f _FOSSIL_ ]]; then \
	  echo '--------------------------------------------------------------------'; \
	  echo "|   Do not forget to run 'fossil up' before running this command   |"; \
	  echo '--------------------------------------------------------------------'; \
	fi
	@mkdir shellpak
	@${TAR} ${DISTEXCLUDES} --exclude=shellpak -c . | ( cd shellpak ; ${TAR} xf - )
	@${TAR} --exclude='*.org' --exclude=.AppleDouble -cvzf $@ shellpak
	@rm -rf shellpak
	@echo "Successfully created ${DISTFILE}"

.PHONY: subdirs ${SUBDIRS}
.PHONY: subdirs ${CLEANDIRS}
.PHONY: subdirs ${HTMDIRS}
.PHONY: subdirs ${PDFDIRS}
.PHONY: subdirs ${TXTDIRS}
.PHONY: subdirs ${MDDIRS}
.PHONY: subdirs ${DBKDIRS}
.PHONE: subdirs ${TXIDIRS}
.PHONY: clean clean-elc docbook html pdf txt markdown texinfo

# Ende
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































Added 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#
# Makefile
#
# Common targets:
#
#   all         : push out to all machines
#   install     : install ShellPAK locally, while building Emacs packages
#   update      : Same as install, but does not auto-build Emacs packages
#   dist        : create a shellpak tarball
#   clean       : cleans up various files in source directory
#   clean-elc   : Remove all top-level *.elc files from ~/.emacs.d
#   clean-all   : clean + clean-elc + clean-xkcd + clean-tags
#   uninstall   : Removes ShellPAK via `shellpak -u`
#
# Documentation targets:
#
#   docbook     : Generate PDF documentation using docbook (org-mode < 8)
#   html        : Generate HTML-formatted documentation
#   markdown    : Generate markdown-formatted documentation (org-mode >= 8)
#   pdf         : Generate PDF documentation using LaTeX
#   txt         : Generate plain-text documentation (UTF-8 encoding when available)
#   texinfo     : Generate PDF documentation using texinfo (org-mode >= 8)
#
# Notes:
#
#   This Makefile is *not* compatible with NetBSD make(1).  Consider
#   using GNU Make (gmake) instead.
#

#
# Variables
#

SHELLDIR=SHELL

SUBDIRS+=docs
SUBDIRS+=emacs.d
SUBDIRS+=hosts

CLEANDIRS=$(SUBDIRS:%=clean-%)

# Documentation variables
DOCDIRS+=docs
HTMDIRS=$(DOCDIRS:%=html-%)
PDFDIRS=$(DOCDIRS:%=pdf-%)
TXTDIRS=$(DOCDIRS:%=txt-%)
MDDIRS=$(DOCDIRS:%=markdown-%)
DBKDIRS=$(DOCDIRS:%=docbook-%)
TXIDIRS=$(DOCDIRS:%=texinfo-%)

# Host targets
LOCALHOSTS=
# REMOTEHOSTS=shell.example.com
REMOTEHOSTS=
PUBLICCO=../public/

# Determine distribution file.  These lines will produce spewage if
# this isn't a fossil checkout
FOSSIL_BRANCH=$(shell fossil info | grep "^tags" | awk -F\: '{print $$2}' | sed 's/ //g' | awk -F\, '{print $$NF}')
FOSSIL_REPO=${HOME}/repos/public.fossil
CKOUT_DATE=$(shell fossil info | grep "^checkout" | awk '{ print $$3 }' | sed 's/[-: ]//g')
DISTFILE=shellpak-${FOSSIL_BRANCH}-${CKOUT_DATE}.tar.gz
DISTEXCLUDES=--exclude=.fslckout --exclude=_FOSSIL_ --exclude=.AppleDouble --exclude=config --exclude=ext

# Command options
EMACS=emacs
EMACS_INIT=${HOME}/.emacs.d/init.el
EMACS_INSTALL_PACKAGES=cmf-autoinstall-packages
RSYNC=rsync
RSYNC_EXCLUDE=global-excludes
RSYNC_OPTS=-Ccavz --exclude='svn-commit*' --exclude='.AppleDouble' --exclude='*~' --exclude-from=${RSYNC_EXCLUDE} --delete
RSYNC_CONN_OPTS=-e ssh
RSYNC_PUBLIC_OPTS=-Ccavz --exclude=GPATH --exclude=GRTAGS --exclude=GTAGS --exclude=docs/*.txt \
  --exclude=.fslckout --exclude=config --exclude=ext --exclude='.AppleDouble' --exclude='*~' \
  --exclude=_FOSSIL_ --exclude=VERSION --delete

SSH=ssh
SSH_SETUP_CMD="cd ${SHELLDIR} ; ./setup.sh"

TAR=$(shell if [ `uname` != "Darwin" ] && type gtar >/dev/null; then echo 'gtar'; else echo 'tar'; fi)
DRYRUN_OPT=$(shell if echo ${DRYRUN} | egrep '[Yy][Ee][Ss]' >/dev/null ; then echo -n '-r'; fi)

#
# Targets
#

all: install local remote
	@echo 'All known hosts updated'

# Convenience target
install: txt setup.sh
	@echo 'Executing setup.sh for ShellPAK installation'
	@setup.sh ${DRYRUN_OPT} -p

uninstall: setup.sh VERSION
	@echo -n 'Removing ShellPAK '
	@cat VERSION
	@setup.sh ${DRYRUN_OPT} -u

update: txt setup.sh
	@echo 'Executing setup.sh for ShellPAK update'
	@setup.sh ${DRYRUN_OPT}

tags: gtags

# Note that this target may not work as expected when used on a case
# insensitive file system (e.g., default HFS+ Apple file system)
gtags:
	@echo 'Generating tags using global(1)'
	@gtags

local: ${LOCALHOSTS}
	@echo 'All local hosts updated'

remote: ${REMOTEHOSTS} ${POLARHOSTS}
	@echo 'All remote hosts updated'

emacs-packages:
	${EMACS} --batch -l ${EMACS_INIT} -f ${EMACS_INSTALL_PACKAGES}

clean : clean-echo ${CLEANDIRS} clean-dist
	@rm -vf *.bak
	@rm -vf *~
	@rm -vf *-baseline
	@rm -vf *-merge
	@rm -vf *-original

clean-echo:
	@echo 'Cleaning old files:'

clean-elc: clean-home-elc

clean-home-elc:
	@echo 'Removing installed elc files:'
	@rm -vf ${HOME}/.emacs.d/*.elc
	@rm -vf ${HOME}/.emacs.d/*~

clean-xkcd :
	@echo 'Removing left-over xkcd comics:'
	@rm -rvf ${HOME}/.emacs.d/xkcd/*

clean-tags : clean-gtags

clean-gtags :
	@rm -vf GPATH GTAGS GRTAGS

clean-all : clean clean-elc clean-xkcd clean-tags

clean-dist: 
	@rm -vf shellpak*.tar.gz
	@rm -rvf shellpak

# WARNING: Will remove *all* installed packages.  Use with care!
clean-elpa: clean-elc
	@rm -rvf ${HOME}/.emacs.d/elpa/*

public:
	@echo 'Syncing with public repository'
	${RSYNC} ${RSYNC_PUBLIC_OPTS} . ${PUBLICCO}

# Target for importing changes from public Fossil repository
git-import: .git
	@echo 'Importing changes from Fossil'
	fossil export --git ${FOSSIL_REPO} | \
          sed 's/^committer cfuhrman <cfuhrman>/committer Christopher M. Fuhrman <cfuhrman@pobox.com>/g' | \
          git fast-import
	git reset --hard trunk

dist: ${DISTFILE}

version: VERSION

VERSION:
	@fossil info | grep "^checkout" | awk '{ printf "[%s] %s %s", substr($$2, 0, 10), $$3, $$4 }' > VERSION

subdirs: ${SUBDIRS}
${SUBDIRS} :
	${MAKE} -C $@

${CLEANDIRS} :
	${MAKE} -C $(@:clean-%=%) clean

# Binary targets
emacs:
	@which emacs >/dev/null


#
# Documentation Targets
#

docbook : emacs ${DBKDIRS}
${DBKDIRS} :
	${MAKE} -C $(@:docbook-%=%) docbook

html : emacs ${HTMDIRS}
${HTMDIRS} :
	${MAKE} -C $(@:html-%=%) html

markdown : emacs ${MDDIRS}
${MDDIRS} :
	${MAKE} -C $(@:markdown-%=%) markdown

pdf : emacs ${PDFDIRS}
${PDFDIRS} :
	${MAKE} -C $(@:pdf-%=%) pdf

txt : emacs ${TXTDIRS}
${TXTDIRS} :
	${MAKE} -C $(@:txt-%=%) txt

texinfo : emacs ${TXIDIRS}
${TXIDIRS} :
	${MAKE} -C $(@:texinfo-%=%) texinfo


#
# Host Targets
#

${LOCALHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

${REMOTEHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

# Note: This target requires a tar that supports '--exclude' option,
# such as GNU tar
${DISTFILE}: clean clean-tags txt version
	@if [[ test -f .fslckout || test -f _FOSSIL_ ]]; then \
	  echo '--------------------------------------------------------------------'; \
	  echo "|   Do not forget to run 'fossil up' before running this command   |"; \
	  echo '--------------------------------------------------------------------'; \
	fi
	@mkdir shellpak
	@${TAR} ${DISTEXCLUDES} --exclude=shellpak -c . | ( cd shellpak ; ${TAR} xf - )
	@${TAR} --exclude='*.org' --exclude=.AppleDouble -cvzf $@ shellpak
	@rm -rf shellpak
	@echo "Successfully created ${DISTFILE}"

.PHONY: subdirs ${SUBDIRS}
.PHONY: subdirs ${CLEANDIRS}
.PHONY: subdirs ${HTMDIRS}
.PHONY: subdirs ${PDFDIRS}
.PHONY: subdirs ${TXTDIRS}
.PHONY: subdirs ${MDDIRS}
.PHONY: subdirs ${DBKDIRS}
.PHONE: subdirs ${TXIDIRS}
.PHONY: clean clean-elc docbook html pdf txt markdown texinfo

# Ende

README.org became a symlink.