patch-Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $Id$
  2. --- procps-3.2.8.orig/Makefile 2009-05-10 20:50:48.000000000 +0200
  3. +++ procps-3.2.8/Makefile 2013-12-23 16:53:06.000000000 +0100
  4. @@ -27,7 +27,7 @@ TARVERSION := $(VERSION).$(SUBVERSION)
  5. ldconfig := ldconfig
  6. ln_f := ln -f
  7. ln_sf := ln -sf
  8. -install := install -D --owner 0 --group 0
  9. +install := install
  10. # Lame x86-64 /lib64 and /usr/lib64 abomination:
  11. lib64 := lib$(shell [ -d /lib64 ] && echo 64)
  12. @@ -82,7 +82,7 @@ CURSES := -lncurses
  13. # Preprocessor flags.
  14. PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
  15. -CPPFLAGS := -I/usr/include/ncurses
  16. +CPPFLAGS ?= -I/usr/include/ncurses
  17. ALL_CPPFLAGS := $(PKG_CPPFLAGS) $(CPPFLAGS)
  18. # Left out -Wconversion due to noise in glibc headers.
  19. @@ -102,11 +102,11 @@ PKG_CFLAGS := -fno-common -ffast-math
  20. -Wstrict-prototypes -Wmissing-prototypes
  21. # Note that some stuff below is conditional on CFLAGS containing
  22. # an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.)
  23. -CFLAGS := -O2 -s
  24. +CFLAGS ?= -O2 -s
  25. ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS)
  26. PKG_LDFLAGS := -Wl,-warn-common
  27. -LDFLAGS :=
  28. +LDFLAGS ?=
  29. ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
  30. ############ Add some extra flags if gcc allows
  31. @@ -128,7 +128,7 @@ check_gcc = $(shell if $(CC) $(ALL_CPPFL
  32. # i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
  33. # Failure to do so will cause data corruption.
  34. m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
  35. -ALL_CFLAGS += $(m64)
  36. +#ALL_CFLAGS += $(m64)
  37. ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
  38. ALL_CFLAGS += $(call check_gcc,-Wpadded,)
  39. @@ -222,10 +222,16 @@ clean:
  40. ###### install
  41. $(BINFILES) : all
  42. - $(install) --mode a=rx $(notdir $@) $@
  43. + mkdir -p $(dir $@)
  44. + for f in $@; do \
  45. + install -c -m 555 $$(basename $$f) $$f; \
  46. + done
  47. $(MANFILES) : all
  48. - $(install) --mode a=r $(notdir $@) $@
  49. + mkdir -p $(dir $@)
  50. + for f in $@; do \
  51. + install -c -m 444 $$(basename $$f) $$f; \
  52. + done
  53. install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
  54. cd $(usr/bin) && $(ln_f) skill snice