noweb.mk.in (1684B)
1 # Copyright (C) 2023-2026 |Méso|Star> (contact@meso-star.com) 2 # 3 # This file is part of Star-Build. 4 # 5 # Star-Build is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation, either version 3 of the License, or 8 # (at your option) any later version. 9 # 10 # Star-Build is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with Star-Build. If not, see <http://www.gnu.org/licenses/>. 17 18 # Configuration macros 19 NOWEB_TAG=@TAG@ 20 NOWEB_URL=https://github.com/nrnrnr/noweb 21 22 # Helper macros 23 NOWEB_DIR=$(CACHE)/noweb/$(NOWEB_TAG) 24 NOWEB_MAKE=$(MAKE)\ 25 BIN="$${prefix}/bin"\ 26 LIB="$${prefix}/lib"\ 27 MAN="$${prefix}/share/man"\ 28 TEXINPUTS="$${prefix}/share/tex/"\ 29 ELISP=/dev/null 30 31 noweb: build_noweb 32 @prefix=$$(cat .prefix) &&\ 33 cd -- "$(NOWEB_DIR)/src" &&\ 34 $(NOWEB_MAKE) install 35 36 build_noweb: $(NOWEB_DIR) prefix 37 @prefix=$$(cat .prefix) &&\ 38 cd -- "$(NOWEB_DIR)/src" &&\ 39 ./awkname awk &&\ 40 $(NOWEB_MAKE) boot &&\ 41 $(NOWEB_MAKE) all 42 43 $(NOWEB_DIR): 44 @git clone --branch "$(NOWEB_TAG)" --depth 1 "$(NOWEB_URL)" "$@" 45 46 clean_noweb: 47 if [ -d "$(NOWEB_DIR)/src" ]; then\ 48 cd -- "$(NOWEB_DIR)/src" && $(MAKE) clean;\ 49 fi 50 51 uninstall_noweb: fetch_noweb prefix 52 @prefix=$$(cat .prefix) &&\ 53 cd -- "$(NOWEB_DIR)/src" &&\ 54 $(NOWEB_MAKE) uninstall &&\ 55 rm -f "$${prefix}/lib/nwmktemp" 56 57 clean_all: clean_noweb 58 install_all: noweb 59 uninstall_all: uninstall_noweb