Makefile 663 B

123456789101112131415161718192021222324
  1. DESTDIR=/
  2. all: clean build
  3. clean:
  4. `find | grep pycache | sed 's/^/rm -rf /g'`
  5. rm -rf build
  6. rm -f po/*.mo
  7. pot:
  8. xgettext --language=Python --keyword=_ --output=inary.pot \
  9. `find inary -type f -iname "*.py"` inary-cli
  10. for file in `ls po/*.po`; do \
  11. msgmerge $$file inary.pot -o $$file.new ; \
  12. rm -f $$file ; \
  13. mv $$file.new $$file ; \
  14. done \
  15. build:
  16. python3 setup.py build
  17. install:
  18. mkdir -p ${DESTDIR}/usr/bin/ ${DESTDIR}/usr/lib/sulin || true
  19. python3 setup.py install --install-lib=/usr/lib/sulin --root=${DESTDIR} --install-scripts=/usr/bin
  20. [ -f ${DESTDIR}/usr/bin/inary ] || ln -s inary-cli ${DESTDIR}/usr/bin/inary || true