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