[Pkg-wmaker-commits] [wmppp.app] 83/120: wmppp.app: Update Makefile.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmppp.app.

commit e03be5f3cdb0789550f22513c046b83788e593c5
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Tue May 19 22:31:05 2015 -0500

    wmppp.app: Update Makefile.
    
    Main change is to use $(INSTALL) instead of cp in install target along with
    $(DESTDIR) variable.  We also remove installation of user ~/.wmppprc config
    file -- this isn't useful for sysadmins or package maintainers.
    
    We also update INSTALL to reflect the changes.
---
 INSTALL  |  7 +++++--
 Makefile | 44 ++++++++++++++++++++++++++------------------
 2 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/INSTALL b/INSTALL
index 5a8e798..ae4805e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -38,8 +38,9 @@ up pppd's configuration files, but do want them to be able
 to make a dialup connection, a sample system.rc file is
 included (system.wmppprc), please take a look at it!
 
-The installation will install standard rc files in $HOME
-and /etc/ WITHOUT the 'force' option!
+The installation will install a standard rc file in /etc
+WITHOUT the 'force' option!  You can also create one in
+$HOME (~/.wmpprc).
 
 How it works:
 
@@ -75,6 +76,8 @@ General Notes
 Note 1: If "make install" fails on your system, please edit
         the Makefile to set the paths according to your setup.
         Make install defaults to /usr/local/bin & /etc/ppp/.
+	You may also change these directories using the various
+	variables, e.g., make PREFIX=/usr.
 
 Note 2: Please DO read the HINTS, this file contains some
         very useful tips and hints about WMPPP.
diff --git a/Makefile b/Makefile
index c1fcce4..ffa7ace 100644
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,44 @@
-LIBDIR = -L/usr/X11R6/lib
 LIBS   = -lXpm -lXext -lX11
-CFLAGS += -O2
 OBJS  = wmppp.o \
 		wmgeneral/wmgeneral.o \
 		wmgeneral/misc.o \
 		wmgeneral/list.o
 
-.c.o:
-	cc -g -c $(CPPFLAGS) $(CFLAGS) -Wall $< -o $*.o
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
 
-wmppp: $(OBJS)
-	cc -o wmppp $(LDFLAGS) $^ -lXext $(LIBDIR) $(LIBS)
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/lib/wmppp.app
+SYSCONFDIR = /etc
+MANDIR = $(PREFIX)/share/man/man1
 
 all:: wmppp getmodemspeed
 
+%.o: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+wmppp: $(OBJS)
+	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+getmodemspeed: getmodemspeed.o
+	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
 clean::
 	for i in $(OBJS) ; do \
 		rm -f $$i; \
 	done
+	rm -f getmodemspeed.o
 	rm -f wmppp getmodemspeed
 
 install::
-
-	cp -f wmppp /usr/local/bin/
-	chmod 755 /usr/local/bin/wmppp
-	chown root:root /usr/local/bin/wmppp
-	cp getmodemspeed /etc/ppp/
-	chmod 755 /etc/ppp/getmodemspeed
-	chown root.root /etc/ppp/getmodemspeed
-	cp -f user.wmppprc /etc/wmppprc
-	chmod 644 /etc/wmppprc
-	chown root.root /etc/wmppprc
-	cp -f user.wmppprc $(HOME)/.wmppprc
-	cp -f wmppp.1 /usr/local/share/man/man1
+	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+	$(INSTALL_PROGRAM) wmppp $(DESTDIR)$(BINDIR)
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+	$(INSTALL_PROGRAM) getmodemspeed $(DESTDIR)$(LIBDIR)
+	$(INSTALL) -d $(DESTDIR)$(SYSCONFDIR)
+	$(INSTALL_DATA) user.wmppprc $(DESTDIR)$(SYSCONFDIR)/wmppprc
+	$(INSTALL) -d $(DESTDIR)$(MANDIR)
+	$(INSTALL_DATA) wmppp.1 $(DESTDIR)$(MANDIR)
 	echo "WMPPP installation finished."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmppp.app.git



More information about the Pkg-wmaker-commits mailing list