Skip to content

Commit 22178c7

Browse files
committed
Makefile - Add make help (default)
1 parent 3fce5c4 commit 22178c7

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

Makefile

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,24 @@ DANECTL_NSUPDATE_NAME=danectl-nsupdate
4545
DANECTL_NSUPDATE_MANFILE=$(DANECTL_NSUPDATE_NAME).$(APP_MANSECT)
4646
DANECTL_NSUPDATE_HTMLFILE=$(DANECTL_NSUPDATE_NAME).$(APP_MANSECT).html
4747

48-
install: install-bin install-man
48+
help:
49+
@echo "This Makefile supports the following targets:"; \
50+
echo; \
51+
echo " help - Show this list of targets (default)"; \
52+
echo " install - install-bin + install-man"; \
53+
echo " install-bin - Install danectl, danectl-zonefile, and danectl-nsupdate"; \
54+
echo " install-man - Install the danectl(1) manual entry"; \
55+
echo " uninstall - uninstall-bin + uninstall-man"; \
56+
echo " uninstall-bin - Uninstall danectl, danectl-zonefile, and danectl-nsupdate"; \
57+
echo " uninstall-man - Uninstall the danectl(1) manual entry"; \
58+
echo " man - Generate the manual entries using pod2man"; \
59+
echo " html - Generate HTML versions of the manual entries using pod2html"; \
60+
echo " clean - Delete any generated manual entries"; \
61+
echo " test - Run the tests"; \
62+
echo " dist - Create the distribution tarball"; \
63+
echo
4964

50-
dist: clean man
51-
@set -e; \
52-
up="`pwd`/.."; \
53-
src=`basename \`pwd\``; \
54-
dst=$(DANECTL_ID); \
55-
cd ..; \
56-
[ "$$src" != "$$dst" -a ! -d "$$dst" ] && ln -s $$src $$dst; \
57-
tar chzf $$up/$(DANECTL_DIST) --exclude='.git*' $$dst; \
58-
[ -h "$$dst" ] && rm -f $$dst; \
59-
tar tzfv $$up/$(DANECTL_DIST); \
60-
ls -l $$up/$(DANECTL_DIST)
65+
install: install-bin install-man
6166

6267
install-bin:
6368
mkdir -p $(APP_INSDIR)
@@ -106,4 +111,16 @@ clean:
106111
test:
107112
./runtests
108113

114+
dist: clean man
115+
@set -e; \
116+
up="`pwd`/.."; \
117+
src=`basename \`pwd\``; \
118+
dst=$(DANECTL_ID); \
119+
cd ..; \
120+
[ "$$src" != "$$dst" -a ! -d "$$dst" ] && ln -s $$src $$dst; \
121+
tar chzf $$up/$(DANECTL_DIST) --exclude='.git*' $$dst; \
122+
[ -h "$$dst" ] && rm -f $$dst; \
123+
tar tzfv $$up/$(DANECTL_DIST); \
124+
ls -l $$up/$(DANECTL_DIST)
125+
109126
# vi:set ts=4 sw=4:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ To uninstall `danectl`:
136136

137137
make uninstall
138138

139+
See `make help` for more details.
140+
139141
# REQUIREMENTS
140142

141143
`Danectl` is written in Bourne shell, and should work on any platform

0 commit comments

Comments
 (0)