support make install
authorTroy Sankey <sankeytm@linux.ucla.edu>
Sat, 1 Mar 2014 02:29:02 +0000 (18:29 -0800)
committerTroy Sankey <sankeytm@linux.ucla.edu>
Sat, 1 Mar 2014 02:29:02 +0000 (18:29 -0800)
GNUmakefile

index 8021128..76a1001 100644 (file)
@@ -1,8 +1,14 @@
-guest-account: guest-account.original guest-account.patch
+.DEFAULT_GOAL : guest-account
+.PHONY : patch install
+
+guest-account : guest-account.original guest-account.patch
        patch -o - guest-account.original <guest-account.patch >guest-account
        chmod a+x guest-account
 
-.PHONY: patch
+install : guest-account
+       test -f /usr/sbin/guest-account \
+       && echo 'file: /usr/sbin/guest-account exists. aborting.' \
+       || cp guest-account /usr/sbin/
 
-patch: guest-account.original guest-account
+patch : guest-account.original guest-account
        diff guest-account.original guest-account >guest-account.patch