Add index + slightly change makefile
This commit is contained in:
		
							
								
								
									
										26
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								Makefile
									
									
									
									
									
								
							@@ -2,18 +2,32 @@ DISTDIR ?= $(shell pwd)
 | 
			
		||||
TEMPLATE_DIR ?= $(DISTDIR)/templates
 | 
			
		||||
SCRIPT_DIR ?= $(DISTDIR)/scripts
 | 
			
		||||
BUILDDIR ?= $(DISTDIR)/build
 | 
			
		||||
DESTDIR ?= /var/www/wikipages
 | 
			
		||||
 | 
			
		||||
export
 | 
			
		||||
 | 
			
		||||
PAGES := $(wildcard pages/*)
 | 
			
		||||
PAGE_TARGETS := $(patsubst pages/%,$(BUILDDIR)/page/%,$(wildcard pages/*))
 | 
			
		||||
 | 
			
		||||
all: $(PAGES) static
 | 
			
		||||
all: $(PAGE_TARGETS) $(BUILDDIR)/index.html static
 | 
			
		||||
 | 
			
		||||
$(PAGES):
 | 
			
		||||
	$(MAKE) -C $@
 | 
			
		||||
$(BUILDDIR)/page/%:
 | 
			
		||||
	@$(MAKE) -C pages/$*
 | 
			
		||||
 | 
			
		||||
static:
 | 
			
		||||
$(BUILDDIR)/static:
 | 
			
		||||
	@mkdir -p $(BUILDDIR)
 | 
			
		||||
	cp -r static $(BUILDDIR)
 | 
			
		||||
 | 
			
		||||
.PHONY: all $(PAGES) static
 | 
			
		||||
$(BUILDDIR)/index.html:
 | 
			
		||||
	cp index.html $(BUILDDIR)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -rfI $(BUILDDIR)/
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
	@mkdir -p $(DESTDIR)
 | 
			
		||||
	cp -r -T $(BUILDDIR)/ $(DESTDIR)/
 | 
			
		||||
 | 
			
		||||
uninstall:
 | 
			
		||||
	rm -rfI $(DESTDIR)/
 | 
			
		||||
 | 
			
		||||
.PHONY: all clean install uninstall
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								index.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="ru">
 | 
			
		||||
    <head>
 | 
			
		||||
    </head>
 | 
			
		||||
    
 | 
			
		||||
    <body>
 | 
			
		||||
        Статьи:
 | 
			
		||||
        <br>
 | 
			
		||||
        <a href="/page/linear_nt">Линейные алгоритмы в теории чисел</a>
 | 
			
		||||
        <br>
 | 
			
		||||
        <a href="/page/quadratic_forms">Квадратичные вычеты и корни по простому модулю</a>
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user