Introduce $(datadir), prefix all installation paths with $(DESTDIR)
[org-mode/org-tableheadings.git] / etc / Makefile
blob9ef280df2a7ef2f44520df08bfed3a5ee15e3b27
1 ETCDIRS = styles
2 -include local.mk # optional local customization
4 .NOTPARALLEL: # always run this make serially
5 .SUFFIXES: # we don't need default suffix rules
6 ifeq ($(MAKELEVEL), 0)
7 $(error This make needs to be started as a sub-make from the toplevel directory.)
8 endif
10 .PHONY: all install clean cleanall clean-install
12 all:
14 install: $(ETCDIRS)
15 $(foreach dir, $?, if [ ! -d $(DESTDIR)$(datadir)/$(dir) ]; then $(MKDIR) $(DESTDIR)$(datadir)/$(dir); else true; fi ; $(CP) $(dir)/* $(DESTDIR)$(datadir)/$(dir); )
17 clean:
19 cleanall:
21 clean-install:
22 if [ ! -d $(DESTDIR)$(datadir) ]; then $(MKDIR) $(DESTDIR)$(datadir); else true; fi ;
23 $(RMR) $(DESTDIR)$(datadir)