1
0

patch-Makefile 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. $Id$
  2. removes manpages, some chown-stuff and the cron-stuff (no need for it)
  3. fixes cross-compilation
  4. --- sysstat-7.0.3.orig/Makefile Sun Oct 22 16:27:03 2006
  5. +++ sysstat-7.0.3/Makefile Fri May 18 18:31:06 2007
  6. @@ -7,7 +7,7 @@ VERSION = 7.0.3
  7. include build/CONFIG
  8. # Compiler to use
  9. -CC = gcc
  10. +CC ?= gcc
  11. # Other commands
  12. SED = sed
  13. CHMOD = chmod
  14. @@ -37,8 +37,9 @@ NLS_DIR = $(PREFIX)/share/locale
  15. SYSCONFIG_DIR = /etc/sysconfig
  16. # Compiler flags
  17. -CFLAGS = -Wall -Wstrict-prototypes -pipe -O2 -fno-strength-reduce
  18. -LFLAGS = -s
  19. +CFLAGS ?= -O2 -pipe
  20. +CFLAGS += -Wall -Wstrict-prototypes -fno-strength-reduce
  21. +LFLAGS = -s ${LDFLAGS}
  22. # SAS_DFLAGS may also contain SMP_RACE definition
  23. SAS_DFLAGS += -DSA_DIR=\"$(SA_DIR)\" -DSADC_PATH=\"$(SADC_PATH)\"
  24. @@ -179,10 +180,8 @@ endif
  25. .PHONY: clean distclean config install install_base install_all uninstall \
  26. uninstall_base uninstall_all dist bdist
  27. -install_base: all man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8 man/iostat.1
  28. +install_base: all
  29. mkdir -p $(DESTDIR)$(SA_LIB_DIR)
  30. - mkdir -p $(DESTDIR)$(MAN1_DIR)
  31. - mkdir -p $(DESTDIR)$(MAN8_DIR)
  32. mkdir -p $(DESTDIR)$(SA_DIR)
  33. ifeq ($(CLEAN_SA_DIR),y)
  34. rm -f $(DESTDIR)$(SA_DIR)/sa??
  35. @@ -191,19 +190,12 @@ endif
  36. mkdir -p $(DESTDIR)$(DOC_DIR)
  37. mkdir -p $(DESTDIR)$(SYSCONFIG_DIR)
  38. install -m 755 sa1 $(DESTDIR)$(SA_LIB_DIR)
  39. - install -m 644 $(MANGRPARG) man/sa1.8 $(DESTDIR)$(MAN8_DIR)
  40. install -m 755 sa2 $(DESTDIR)$(SA_LIB_DIR)
  41. - install -m 644 $(MANGRPARG) man/sa2.8 $(DESTDIR)$(MAN8_DIR)
  42. install -m 755 sadc $(DESTDIR)$(SA_LIB_DIR)
  43. - install -m 644 $(MANGRPARG) man/sadc.8 $(DESTDIR)$(MAN8_DIR)
  44. install -m 755 sar $(DESTDIR)$(BIN_DIR)
  45. - install -m 644 $(MANGRPARG) man/sar.1 $(DESTDIR)$(MAN1_DIR)
  46. install -m 755 sadf $(DESTDIR)$(BIN_DIR)
  47. - install -m 644 $(MANGRPARG) man/sadf.1 $(DESTDIR)$(MAN1_DIR)
  48. install -m 755 iostat $(DESTDIR)$(BIN_DIR)
  49. - install -m 644 $(MANGRPARG) man/iostat.1 $(DESTDIR)$(MAN1_DIR)
  50. install -m 755 mpstat $(DESTDIR)$(BIN_DIR)
  51. - install -m 644 $(MANGRPARG) man/mpstat.1 $(DESTDIR)$(MAN1_DIR)
  52. install -m 644 sysstat.ioconf $(DESTDIR)$(SYSCONFIG_DIR);
  53. install -m 644 CHANGES $(DESTDIR)$(DOC_DIR)
  54. install -m 644 COPYING $(DESTDIR)$(DOC_DIR)
  55. @@ -243,18 +235,6 @@ ifdef REQUIRE_NLS
  56. endif
  57. install_all: install_base
  58. - $(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR)
  59. - if [ -d $(DESTDIR)/etc/cron.d ]; then \
  60. - install -m 644 sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
  61. - elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \
  62. - install -m 755 sysstat.cron.hourly $(DESTDIR)/etc/cron.hourly/sysstat; \
  63. - install -m 755 sysstat.cron.daily $(DESTDIR)/etc/cron.daily/sysstat; \
  64. - else \
  65. - su $(CRON_OWNER) -c "crontab -l > /tmp/crontab-$(CRON_OWNER).save"; \
  66. - $(CP) -a /tmp/crontab-$(CRON_OWNER).save ./crontab-$(CRON_OWNER).`date '+%Y%m%d.%H%M%S'`.save; \
  67. - echo "USER PREVIOUS CRONTAB SAVED IN CURRENT DIRECTORY (USING .save SUFFIX)."; \
  68. - su $(CRON_OWNER) -c "crontab crontab"; \
  69. - fi
  70. if [ -d $(DESTDIR)$(INIT_DIR) ]; then \
  71. install -m 755 sysstat $(DESTDIR)$(INIT_DIR)/sysstat; \
  72. if [ -x $(CHKCONFIG) ]; then \