wmcalc: Allow installation without root access.

Drop "-p -o root -g root" from the INSTALL_* Makefile variables and honor
the CONF Makefile variable for accessing the global config file instead of
hardcoding it as /etc.

These changes allow users without root access to install wmcalc in their home
directory.
This commit is contained in:
Doug Torrance 2015-01-10 10:59:52 -06:00 committed by Carlos R. Mafra
parent a43ce43092
commit 544c36b79c
2 changed files with 4 additions and 4 deletions

View file

@ -10,11 +10,11 @@ MANDIR = $(PREFIX)/share/man/man1
CONF = /etc
INSTALL = /usr/bin/install
INSTALL_DIR = $(INSTALL) -d
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
INSTALL_PROGRAM = $(INSTALL)
INSTALL_FILE = $(INSTALL) -m 644
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
$(CC) -DCONF=\"$(CONF)\" $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)

View file

@ -17,7 +17,7 @@
#define CALC_CMD_SIZE 128
#define CONFFILENAME "/.wmcalc"
#define CONFTEMPFILE "/tmp/wmcalc.tmp"
#define CONFIGGLOBAL "/etc/wmcalc.conf"
#define CONFIGGLOBAL CONF"/wmcalc.conf"
#define VER 0
#define REL 3