1: #!/usr/bin/env bash
2:
3: #
4: # $Id: genmake.sh,v 1.1 2025/04/22 18:54:50 snw Exp $
5: # Generate top-level Makefile
6: #
7: # Copyright (C) 2025 Serena Willis
8: #
9: # $Log: genmake.sh,v $
10: # Revision 1.1 2025/04/22 18:54:50 snw
11: # Improve builds
12: #
13: #
14:
15: DIRS=$(ls -d */ | sort -r)
16: PAPERS=""
17:
18: for DIR in $DIRS
19: do
20: if [[ "${DIR}" != "CVS/" ]]
21: then
22: PAPER=$(echo "${DIR}" | tr -d '/')
23: PAPERS="${PAPER} ${PAPERS}"
24: fi
25: done
26:
27: echo "PAPERS = ${PAPERS}" | tee Makefile
28: echo 'all: $(PAPERS)' | tee -a Makefile
29:
30: for PAPER in ${PAPERS}
31: do
32: echo "${PAPER}:" | tee -a Makefile
33: printf "\t%s" "cd ${PAPER} && \$(MAKE)" | tee -a Makefile
34: echo "" | tee -a Makefile
35: done
36:
37: echo ".PHONY: ${PAPERS}" | tee -a Makefile
38:
39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>