summaryrefslogblamecommitdiffstats
path: root/Makefile
blob: eb12420529a11a0e8fba5f7080b8b2346b5b3bda (plain) (tree)
1
2
3
4
5
6
7
8
9

                               
                             
 
                   

                       

                   
                                          


            


                                      
 
 
     
                                            
            
 
     
                                            

            
 


           
 
                                            
                                 
                                               
 




                                         
 



                          


                             
 
      
                            
                                 
             
 

            
                                                    
              
BUILD_DIR=_build
CSS_DIR=$(BUILD_DIR)/assets/css
JS_DIR=$(BUILD_DIR)/assets/js

SCSS=scss/_all.scss
CSS=$(CSS_DIR)/fsfi.css

JS_SRC=js/navbar.js

site: $(BUILD_DIR) css static js html feed
.PHONY: site


static: $(BUILD_DIR)
	rsync -a static/ $(BUILD_DIR)/
.PHONY: static


html:
	PYTHONPATH=vendor python3 ./bin/html
.PHONY: html

feed:
	PYTHONPATH=vendor python3 ./bin/feed
.PHONY: feed


css: $(CSS)
.PHONY: css


$(CSS): $(SCSS) scss/style.scss $(BUILD_DIR)
	mkdir -p `dirname $(CSS)`
	sassc --style compressed $(SCSS) $(CSS)


js: $(JS_DIR) $(JS_SRC)
	cat $(JS_SRC) > $(JS_DIR)/fsfi.js
.PHONY: js


$(JS_DIR):
	mkdir -p $(JS_DIR)


$(BUILD_DIR):
	mkdir -p $(BUILD_DIR)


clean:
	rm -rf $(BUILD_DIR)/
	rm -rf vendor/__pycache__
.PHONY: clean


upload: site
	rsync -avz _build/ gnu.org.in:/var/www/fsfi/
.PHONY: upload