aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 072ef254df91f1af6a2b29dbf528ae021fd950c1 (plain) (tree)
1
2
3
4
5
6
7
8
9
       
 
             
 

                                                                          
 

             
 
                       
 
                                                             
                      
 


                                                                                                            
 


                                                                 
 
          

                                                                                                               


             
                                                 
 
                                                     
.POSIX:

PREFIX = /usr

PYTHON_MAJOR = $$(python --version 2>&1 | cut -d . -f 1 | cut -d ' ' -f 2)
PYTHON_MINOR = $$(python$(PYTHON_MAJOR) --version 2>&1 | cut -d . -f 2)

all:
	@true

info: solar-python.info

solar-python.info: info/solar-python.texinfo info/fdl.texinfo
	$(MAKEINFO) $<

install:
	mkdir -p -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages"
	cp -- solar_python.py "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/"

install-info: solar-python.info
	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/info"
	cp -- solar-python.info "$(DESTDIR)$(PREFIX)/share/info/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/solar_python.py"
	-rm -f -- "$(DESTDIR)$(PREFIX)/share/info/solar-python.info"

.PHONY: clean
clean:
	-rm -rf -- *.pyc *.pyo __pycache__ *.info

.PHONY: all info install install-info uninstall clean