1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
# Eukleides main makefile
# Copyright (c) Christian Obrecht 2004-2010
include Config
MAKEC = $(MAKE) --no-print-directory -C
LOC := $(strip $(LOCALES))
INSTALL_BINARIES := $(addsuffix .install,$(BINARIES))
all: bin loc doc man
bin: $(BINARIES)
$(BINARIES):
@echo "Making $@"
@export BINARY=$@ && $(MAKEC) build
loc:
ifneq ($(LOC),)
@echo "Making locales"
@$(MAKEC) contrib/po
endif
doc: loc_doc
@echo "Making documentation"
@$(MAKEC) doc
loc_doc:
ifneq ($(LOC),)
@echo "Making locales documentation"
@$(MAKEC) contrib/po documentation
endif
.PHONY: man
man:
@echo "Compressing man pages"
@$(MAKEC) man
install: $(INSTALL_BINARIES) install_scr install_tex install_loc install_doc \
install_man install_exm
$(INSTALL_BINARIES):
@export BINARY=$(basename $@) && $(MAKEC) build install
install_scr:
@echo "Installing scripts"
@install bash/* $(BIN_DIR)
install_tex:
@echo "Installing TeX files"
@install -d $(TEX_DIR)
@install -m 0644 tex/* $(TEX_DIR)
#@mktexlsr 2> /dev/null
mktexlsr
install_loc:
ifneq ($(LOC),)
@echo "Installing locales"
@$(MAKEC) contrib/po install
endif
install_doc:
@echo "Installing documentation"
@$(MAKEC) doc install
ifneq ($(LOC),)
@$(MAKEC) contrib/po install_doc
endif
install_exm:
@echo "Installing examples"
@install -d $(EXM_DIR)
@install -m 0644 contrib/examples/* $(EXM_DIR)
install_man:
@echo "Installing man pages"
@$(MAKEC) man install
uninstall: uninstall_bin uninstall_scr uninstall_tex uninstall_loc \
uninstall_doc uninstall_man
uninstall_bin:
@echo "Uninstalling binaries"
@$(MAKEC) build uninstall
uninstall_scr:
@echo "Uninstalling scripts"
@$(RM) $(addprefix $(BIN_DIR)/,$(notdir $(wildcard bash/*)))
uninstall_tex:
@echo "Uninstalling TeX files"
@$(RM) -r $(TEX_DIR)
@mktexlsr 2> /dev/null
uninstall_loc:
ifneq ($(LOC),)
@echo "Uninstalling locales"
@$(MAKEC) contrib/po uninstall
endif
uninstall_doc:
@echo "Uninstalling documentation"
@$(MAKEC) doc uninstall
uninstall_man:
@echo "Uninstalling man pages"
@$(MAKEC) man uninstall
clean: clean_bin clean_loc clean_doc clean_man
clean_bin:
@echo "Cleaning binaries"
@$(MAKEC) build clean
clean_loc:
ifneq ($(LOC),)
@echo "Cleaning locales"
@$(MAKEC) contrib/po clean
endif
clean_doc:
@echo "Cleaning documentation"
@$(MAKEC) doc clean
clean_man:
@echo "Cleaning man pages"
@$(MAKEC) man clean
|