You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

72 lines
2.1 KiB

  1. PROGRAM=tasksel
  2. DOMAIN=debian-tasks
  3. TASKDESC=$(DOMAIN).desc
  4. TASKDIR=/usr/share/tasksel
  5. DESCDIR=tasks
  6. DESCPO=$(DESCDIR)/po
  7. CC=gcc
  8. CFLAGS=-g -Wall #-Os
  9. DEBUG=1
  10. ifeq (0,$(DEBUG))
  11. DEFS=-DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PROGRAM)\" -DLOCALEDIR=\"/usr/share/locale\" \
  12. -DTASKDIR=\"$(TASKDIR)\"
  13. else
  14. DEFS=-DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PROGRAM)\" -DLOCALEDIR=\"/usr/share/locale\" \
  15. -DTASKDIR=\".\" -DDEBUG
  16. endif
  17. VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)' | cut -d - -f 1)
  18. LIBS=-lslang #-lccmalloc -ldl
  19. OBJS=tasksel.o slangui.o data.o util.o strutl.o
  20. LANGS=cs da de es fr hu it ja no nn pl pt_BR ru sv zh_TW
  21. LANGS_DESC=de
  22. LOCALEDIR=$(DESTDIR)/usr/share/locale
  23. COMPILE = $(CC) $(CFLAGS) $(DEFS) -c
  24. LINK = $(CC) $(CFLAGS) $(DEFS) -o
  25. all: $(PROGRAM) $(TASKDESC) $(DESCPO)/build_stamp
  26. $(TASKDESC): makedesc.pl $(DESCDIR)/[a-z]??*
  27. perl doincludes.pl $(DESCDIR)
  28. perl makedesc.pl $(DESCDIR) $(TASKDESC)
  29. %.o: %.c
  30. $(COMPILE) $<
  31. po/build_stamp:
  32. $(MAKE) -C po LANGS="$(LANGS)"
  33. updatepo:
  34. $(MAKE) -C po update LANGS="$(LANGS)"
  35. $(DESCPO)/build_stamp:
  36. $(MAKE) -C $(DESCPO) LANGS="$(LANGS_DESC)"
  37. $(PROGRAM): $(OBJS) po/build_stamp
  38. $(LINK) $(PROGRAM) $(OBJS) $(LIBS)
  39. install:
  40. install -m 755 tasksel $(DESTDIR)/usr/bin
  41. install -m 0644 $(TASKDESC) $(DESTDIR)$(TASKDIR)
  42. pod2man --center "Debian specific manpage" --release $(VERSION) tasksel.pod | gzip -9c > $(DESTDIR)/usr/share/man/man8/tasksel.8.gz
  43. for lang in $(LANGS); do \
  44. [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \
  45. install -m 644 po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PROGRAM).mo; \
  46. done
  47. for lang in $(LANGS_DESC); do \
  48. [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \
  49. install -m 644 tasks/po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
  50. done
  51. test:
  52. $(MAKE) -C scratch
  53. clean:
  54. rm -f $(PROGRAM) $(TASKDESC) *.o *~
  55. $(MAKE) -C po clean
  56. $(MAKE) -C $(DESCPO) clean
  57. # This taget is run on auric to generate the overrides files.
  58. override:
  59. @cvs up tasks 2>&1 | grep -v ^U | grep -v ".cvspass" || true
  60. @perl makeoverride.pl $(DESCDIR) > ../tasks.sid