Fichiers CSS pour la personnalisation des interfaces des organisations/institutions
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Makefile 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Q=@
  2. # Source directory (CSS files and images)
  3. SRC_DIR = ils
  4. SRC_CSS = $(SRC_DIR)/css
  5. SRC_IMG = $(SRC_DIR)/images
  6. # Source files
  7. CSS_FILES := $(wildcard ils/css/*.css)
  8. IMG_FILES := $(wildcard ils/images/*.svg)
  9. # Those we want to keep (some on /test directory, other on /pilot)
  10. TEST_ORGS = global aoste fictive highlands
  11. PILOT_ORGS = global bulle mvs rbnj
  12. # Different destination directories
  13. TEST_DIR = static/test
  14. PILOT_DIR = static/pilot
  15. O9_DIR = static-o9
  16. # Destination files
  17. TEST_CSS_FILES = $(TEST_ORGS:%=$(TEST_DIR)/css/%.css)
  18. TEST_IMG_FILES = $(TEST_ORGS:%=$(TEST_DIR)/images/logo-%.svg)
  19. PILOT_CSS_FILES = $(PILOT_ORGS:%=$(PILOT_DIR)/css/%.css)
  20. PILOT_IMG_FILES = $(PILOT_ORGS:%=$(PILOT_DIR)/images/logo-%.svg)
  21. O9_CSS_FILES = $(CSS_FILES:%=$(O9_DIR)/%)
  22. O9_IMG_FILES = $(IMG_FILES:%=$(O9_DIR)/%)
  23. # What will be generated
  24. all: static.tar.gz static-o9.tar.gz
  25. # ils/test files
  26. $(TEST_DIR)/css : $(TEST_CSS_FILES)
  27. $Qmkdir -p $(@D)
  28. $(TEST_DIR)/css/%.css : $(SRC_CSS)/%.css
  29. $Qmkdir -p $(@D)
  30. $Qcp "$<" "$@"
  31. $Qsed -i 's#resources\.rero\.ch/ils#resources\.rero\.ch/ils/test#g' "$@"
  32. $(TEST_DIR)/images : $(TEST_IMG_FILES)
  33. $Qmkdir -p $(@D)
  34. $(TEST_DIR)/images/logo-%.svg : $(SRC_IMG)/logo-%.svg
  35. $Qmkdir -p $(@D)
  36. $Qcp "$<" "$@"
  37. # ils/pilot files
  38. $(PILOT_DIR)/css : $(PILOT_CSS_FILES)
  39. $Qmkdir -p $(@D)
  40. $(PILOT_DIR)/css/%.css : $(SRC_CSS)/%.css
  41. $Qmkdir -p $(@D)
  42. $Qcp "$<" "$@"
  43. $Qsed -i 's#resources\.rero\.ch/ils#resources\.rero\.ch/ils/pilot#g' "$@"
  44. $(PILOT_DIR)/images : $(PILOT_IMG_FILES)
  45. $Qmkdir -p $(@D)
  46. $(PILOT_DIR)/images/logo-global.svg: logo-global.pilot.svg
  47. $Qmkdir -p $(@D)
  48. $Qcp "$<" "$@"
  49. $(PILOT_DIR)/images/logo-%.svg : $(SRC_IMG)/logo-%.svg
  50. $Qmkdir -p $(@D)
  51. $Qcp "$<" "$@"
  52. static: $(TEST_DIR)/css $(TEST_DIR)/images $(PILOT_DIR)/css $(PILOT_DIR)/images
  53. static.tar.gz: static
  54. $Qtar cfz "$@" --directory=static/ pilot test
  55. ## For o9.re ##
  56. $(O9_DIR)/css : $(O9_CSS_FILES)
  57. $(O9_DIR)/ils/css/%.css : $(SRC_CSS)/%.css
  58. $Qmkdir -p $(@D)
  59. $Qcp "$<" "$@"
  60. $Qsed -i 's#resources\.rero\.ch#o9\.re#g' "$@"
  61. $(O9_DIR)/images : $(O9_IMG_FILES)
  62. $(O9_DIR)/ils/images/%.svg : $(SRC_IMG)/%.svg
  63. $Qmkdir -p $(@D)
  64. $Qcp "$<" "$@"
  65. $(O9_DIR): $(O9_DIR)/css $(O9_DIR)/images
  66. static-o9.tar.gz: static-o9
  67. $Qtar cfz "$@" --directory=static-o9/ ils
  68. # To clean generated files
  69. .PHONY: clean
  70. clean:
  71. $Qrm -rf static/ static-pilot/ static-o9/ *.tar.gz