Annotation of papers/genmake.sh, revision 1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>