aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2018-01-06 15:36:36 -0500
committerU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2018-01-06 15:36:36 -0500
commitef6d6e0e391414efcd7f5dc89779b8b36f85dfdc (patch)
treed2c9872241dcfd1f8738478b469962a20248b414
parent59e9bfb0ff0aaad9a57fcf4a83842211be7d4b40 (diff)
Added m4 check
-rw-r--r--Makefile27
1 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index a583c86..1f79924 100644
--- a/Makefile
+++ b/Makefile
@@ -14,14 +14,14 @@ all:
@echo "Use 'make clean' to clear build environment"
install: tmp/xinetd
- cp build/quickstat /etc/xinetd.d
- cp build/quickstat.sh /usr/sbin
- echo -e "#Adding quickstat service" >> /etc/services
- echo -e "quickstat\t$(call getsetting,tmp/port.txt,PORT)/tcp" >> /etc/services
- echo -e "quickstat\t$(call getsetting,tmp/port.txt,PORT)/udp" >> /etc/services
+ cp build/quickstat /etc/xinetd.d
+ cp build/quickstat.sh /usr/sbin
+ echo -e "#Adding quickstat service" >> /etc/services
+ echo -e "quickstat\t$(call getsetting,tmp/port.txt,PORT)/tcp" >> /etc/services
+ echo -e "quickstat\t$(call getsetting,tmp/port.txt,PORT)/udp" >> /etc/services
tmp/xinetd: tmp
- @[[ -n "$$(which xinetd)" ]] && touch tmp/xinetd
+ @[[ -n "$$(which xinetd)" ]] && touch tmp/xinetd
setup: build/quickstat build/quickstat.sh
@@ -29,20 +29,23 @@ clean:
rm -rf tmp
rm -rf build
-build/quickstat: build tmp/port.ok
- m4 -DPORT=$(call getsetting,tmp/port.txt,PORT) service.m4 > build/quickstat
+build/quickstat: build tmp/port.ok tmp/m4.ok
+ m4 -DPORT=$(call getsetting,tmp/port.txt,PORT) service.m4 > build/quickstat
+
+tmp/m4.ok: tmp
+ @[[ -n "$$(which m4)" ]] && touch tmp/m4.ok
tmp/port.txt: tmp
- $(call newsetting,Enter port number,PORT,8080,tmp/port.txt)
+ $(call newsetting,Enter port number,PORT,8080,tmp/port.txt)
tmp/port.ok: tmp/port.txt
- @[[ -z "$$(grep "$(call getsetting,tmp/port.txt,PORT)" /etc/services)" ]] && touch tmp/port.ok
+ @[[ -z "$$(grep "$(call getsetting,tmp/port.txt,PORT)" /etc/services)" ]] && touch tmp/port.ok
build/quickstat.sh: build
- cp quickstat.sh build
+ cp quickstat.sh build
build:
mkdir build
tmp:
-
+ mkdir tmp