Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/ https://fsfe.org
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.

Makefile 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .PHONY: all
  2. all: subdirs localmenus
  3. # -----------------------------------------------------------------------------
  4. # Dive into subdirectories
  5. # -----------------------------------------------------------------------------
  6. SUBDIRS := $(shell find */* -name "Makefile" | xargs --max-args=1 dirname)
  7. .PHONY: subdirs $(SUBDIRS)
  8. subdirs: $(SUBDIRS)
  9. $(SUBDIRS):
  10. $(MAKE) -C $@
  11. # -----------------------------------------------------------------------------
  12. # Handle local menus
  13. # -----------------------------------------------------------------------------
  14. HELPERFILE := menuhelper
  15. SELECT := '<localmenu.*</localmenu>'
  16. STYLESHEET := ./tools/buildmenu.xsl
  17. FIND := ./\(.*/\)*\(.*\)\.\([a-z][a-z]\)\.xhtml:[ \t]*\(.*\)
  18. REPLACE := <menuitem language="\3"><dir>\1</dir><link>\2.html</link>\4</menuitem>
  19. sources := $(shell grep -l -R --include='*.xhtml' $(SELECT) . )
  20. .PHONY: localmenus
  21. localmenus: localmenuinfo.xml
  22. $(HELPERFILE) :
  23. rm -f $(HELPERFILE)
  24. echo \<localmenuset\> > $(HELPERFILE)
  25. grep -R --include='*.xhtml' $(SELECT) .| sed -e 's,$(FIND),$(REPLACE),' >> $(HELPERFILE)
  26. echo \</localmenuset\> >> $(HELPERFILE)
  27. localmenuinfo.xml: $(HELPERFILE) $(sources)
  28. xsltproc -o $@ $(STYLESHEET) $(HELPERFILE)
  29. rm -f $(HELPERFILE)
  30. %.html : %.xhtml $(HELPERFILE)
  31. perl tools/bogus-build.pl $< | xsltproc -o $@ fsfeurope.xsl -