- fix library directories

- build without root permissions
This commit is contained in:
Karsten Keil 2008-08-31 10:49:38 +00:00
parent 8085606f78
commit dac8c9201c
5 changed files with 18 additions and 13 deletions

View File

@ -9,6 +9,8 @@ export I4LVERSION = 3.12
all: do-it-all
LIBDIR:=/usr/lib
#
# Make "config" the default target if there is no configuration file.
#
@ -130,9 +132,9 @@ rootperm:
exit 1; \
fi
install: rootperm
install:
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i install; done
@if [ -c $(DESTDIR)/dev/isdnctrl0 ] && ls -l $(DESTDIR)/dev/isdnctrl0 | egrep "[[:space:]]45,[[:space:]]+64[[:space:]]" > /dev/null; \
@: || if [ -c $(DESTDIR)/dev/isdnctrl0 ] && ls -l $(DESTDIR)/dev/isdnctrl0 | egrep "[[:space:]]45,[[:space:]]+64[[:space:]]" > /dev/null; \
then \
/bin/echo -e '(some) ISDN devices already exist, not creating them.\nUse scripts/makedev.sh manually if necessary.'; \
else \
@ -202,7 +204,7 @@ subconfig: scripts/autoconf.h
@set -e; for i in `echo $(BUILD_ONLY) $(SUBDIRS)`; do \
if [ -x $$i/configure ] ; then \
/bin/echo -e "\nRunning configure in $$i ...\n"; sleep 1; \
(cd $$i; ./configure --sbindir=$(CONFIG_SBINDIR) --bindir=$(CONFIG_BINDIR) --mandir=$(CONFIG_MANDIR) --datadir=$(CONFIG_DATADIR) || $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
(cd $$i; ./configure --sbindir=$(CONFIG_SBINDIR) --bindir=$(CONFIG_BINDIR) --mandir=$(CONFIG_MANDIR) --datadir=$(CONFIG_DATADIR) --libdir=$(LIBDIR) || $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
elif [ -f $$i/Makefile.in ] ; then \
/bin/echo -e "\nRunning make -f Makefile.in config in $$i ...\n"; sleep 1; \
$(MAKE) -C $$i -f Makefile.in config; \

View File

@ -52,10 +52,10 @@ install-man: $(MANPAGE)
mkdir -p $(DESTDIR)$(MAN8DIR)
$(INSTALL_MAN) $< $(DESTDIR)$(MAN8DIR)/$(MANPAGE)
install: $(PROGS) rootperm install-man
install -s -o 0 -g 0 -m 0755 $(PROGS) $(DESTDIR)$(CONFIG_SBINDIR)
install: $(PROGS) install-man
install -m 0755 $(PROGS) $(DESTDIR)$(CONFIG_SBINDIR)
uninstall: rootperm
uninstall:
for i in $(PROGS) ; do rm -f $(DESTDIR)$(CONFIG_SBINDIR)/$$i; done
clean:

View File

@ -72,7 +72,7 @@ HEADERS := $(HEADERS) .depend
endif
DEBUG_FLAGS = @CONFIG_IPPPD_DEBUGFLAGS@
COMPILE_FLAGS =
COMPILE_FLAGS = @CFLAGS@
CFLAGS = -O2 -fomit-frame-pointer -Wall
VER = 2.2.0

View File

@ -19,6 +19,9 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log$
## Revision 1.224 2007/01/05 04:23:57 tobiasb
## Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
##
## Revision 1.223 2006/07/03 19:47:51 tobiasb
## Fix in filelist generation for NO_UTF8=1.
##
@ -2033,7 +2036,7 @@ ifneq ($(NO_ROOTPERM), 1)
fi
endif
uninstall: rootperm
uninstall:
if ps x | fgrep $(ISDNLOG) >/dev/null; then kill `cat $(RUNDIR)/isdnlog.isdnctrl0.pid` 2>/dev/null; fi
rm -f $(DESTDIR)$(SBINDIR)/$(ISDNLOG) \
$(DESTDIR)$(BINDIR)/$(ISDNREP) \
@ -2055,7 +2058,7 @@ uninstall: rootperm
$(DESTDIR)$(DATADIR)/dest.cdb
installdirs: rootperm
installdirs:
$(INSTALL_DIR) $(DESTDIR)$(I4LCONFDIR)
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
@ -2064,7 +2067,7 @@ installdirs: rootperm
$(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)
install: all rootperm installdirs install-conf install-data install-progs
install: all installdirs install-conf install-data install-progs
install-old-conf:
@if [ -n "$(DESTDIR)$(OLDCONFDIR)" -a "$(DESTDIR)$(OLDCONFDIR)" != '/' ] ; then \
@ -2147,7 +2150,7 @@ install-data:
$(INSTALL_DATA) $$f $(DESTDIR)$(DATADIR); \
echo Installing $(DESTDIR)$(DATADIR)/$$f; \
done
@(grep isdnlog $(SERVICEFILE) >/dev/null) || \
@: || (grep isdnlog $(SERVICEFILE) >/dev/null) || \
(echo "";echo "";echo "Add a line to the file $(SERVICEFILE)" ;echo "";echo ""; \
echo "isdnlog $(SERV_PORT)/tcp isdnlog" >> $(SERVICEFILE))

View File

@ -8,8 +8,8 @@ PROGRAM = telrate.cgi
CGIDIR = @CGIDIR@
TELDIR = @TELDIR@
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0755
INSTALL_FILE = $(INSTALL) -o 0 -g 0 -m 0644
INSTALL_PROGRAM = $(INSTALL) -m 0755
INSTALL_FILE = $(INSTALL) -m 0644
FILES = index.html info.html *.jpg *.gif tt.js