patch-Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. - pass CC, CFLAGS and LDFLAGS when running subdir configure and make
  2. - install without root-permissions, do not create device nodes
  3. - need to pass PPPVERSIONS to subtargets
  4. --- capi4k-utils.orig/Makefile 2002-11-20 14:45:14.000000000 +0100
  5. +++ capi4k-utils/Makefile 2011-07-15 14:15:21.446001582 +0200
  6. @@ -53,7 +53,7 @@ ifneq ($(SUBDIRS),)
  7. endif
  8. subtargets: $(CONFIGURATION)
  9. - set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i all; done
  10. + set -e; for i in `echo $(SUBDIRS)`; do CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" PPPVERSIONS="${PPPVERSIONS}" $(MAKE) -C $$i all; done
  11. rootperm:
  12. @echo 'main(int argc,char**argv){unlink(argv[0]);return(getuid()==0);}'>g
  13. @@ -62,16 +62,10 @@ rootperm:
  14. exit 1; \
  15. fi
  16. -install: rootperm
  17. +install:
  18. set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i install; done
  19. - @if [ -c $(DESTDIR)/dev/isdnctrl0 ] && ls -l $(DESTDIR)/dev/isdnctrl0 | egrep "[[:space:]]45,[[:space:]]+64[[:space:]]" > /dev/null; \
  20. - then \
  21. - echo -e '(some) ISDN devices already exist, not creating them.\nUse scripts/makedev.sh manually if necessary.'; \
  22. - else \
  23. - sh scripts/makedev.sh $(DESTDIR) ; \
  24. - fi
  25. -uninstall: rootperm
  26. +uninstall:
  27. set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i uninstall; done
  28. #
  29. @@ -134,7 +128,7 @@ subconfig: scripts/autoconf.h
  30. @set -e; for i in `echo $(SUBDIRS)`; do \
  31. if [ -x $$i/configure ] ; then \
  32. echo -e "\nRunning configure in $$i ...\n"; sleep 1; \
  33. - (cd $$i; ./configure --sbindir=$(CONFIG_SBINDIR) --bindir=$(CONFIG_BINDIR) --mandir=$(CONFIG_MANDIR) || $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
  34. + (cd $$i; CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure --sbindir=$(CONFIG_SBINDIR) --bindir=$(CONFIG_BINDIR) --mandir=$(CONFIG_MANDIR) || $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
  35. elif [ -f $$i/Makefile.in ] ; then \
  36. echo -e "\nRunning make -f Makefile.in config in $$i ...\n"; sleep 1; \
  37. $(MAKE) -C $$i -f Makefile.in config; \