Check-in by ben on 2024-08-04 23:53:17 Replace Makefile with two small shell scripts. It's more K.I.S.S. than dealing with BSD vs GNU make. INSERTED DELETED 0 58 Makefile 27 0 clean.sh 40 0 make.sh 3 3 readme.txt 70 61 TOTAL over 4 changed files DELETED Makefile Index: Makefile ================================================================== --- Makefile +++ /dev/null @@ -1,58 +0,0 @@ -DESTDIR = pharos -SRC = src - -CGIS = $(DESTDIR)/debug/index.cgi \ - $(DESTDIR)/raw/index.cgi \ - $(DESTDIR)/text/index.cgi - -DCGIS = $(DESTDIR)/account/index.dcgi \ - $(DESTDIR)/details/index.dcgi \ - $(DESTDIR)/direct/index.dcgi \ - $(DESTDIR)/download/index.dcgi \ - $(DESTDIR)/links/index.dcgi \ - $(DESTDIR)/list/index.dcgi \ - $(DESTDIR)/lists/index.dcgi \ - $(DESTDIR)/search/index.dcgi \ - $(DESTDIR)/sort/index.dcgi \ - $(DESTDIR)/wizard/step1/index.dcgi \ - $(DESTDIR)/wizard/step2/index.dcgi \ - $(DESTDIR)/wizard/step3/index.dcgi - -GOPHERMAPS = $(DESTDIR)/index.gph \ - $(DESTDIR)/audio/index.gph \ - $(DESTDIR)/books/index.gph \ - $(DESTDIR)/images/index.gph \ - $(DESTDIR)/software/index.gph \ - $(DESTDIR)/video/index.gph - -all: $(DESTDIR) $(CGIS) $(DCGIS) $(GOPHERMAPS) - -$(DESTDIR)/debug/index.cgi: $(SRC)/raw/index.cgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/text/index.cgi: $(SRC)/raw/index.cgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/direct/index.dcgi: $(SRC)/download/index.dcgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/links/index.dcgi: $(SRC)/raw/index.cgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/%.cgi: $(SRC)/%.cgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/%.dcgi: $(SRC)/%.dcgi.m4 - m4 -I $(SRC) $< >$@ - chmod a+rx $@ - -$(DESTDIR)/%.gph: $(SRC)/%.gph.m4 - m4 -I $(SRC) $< >$@ - -clean: - rm -f $(CGIS) $(DCGIS) $(GOPHERMAPS) ADDED clean.sh Index: clean.sh ================================================================== --- /dev/null +++ clean.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -x +cd pharos +rm -f index.gph \ + account/index.dcgi \ + audio/index.gph \ + books/index.gph \ + images/index.gph \ + debug/index.cgi \ + details/index.dcgi \ + direct/index.dcgi \ + download/index.dcgi \ + links/index.dcgi \ + list/index.dcgi \ + lists/index.dcgi \ + raw/index.cgi \ + search/index.dcgi \ + software/index.gph \ + sort/index.dcgi \ + text/index.cgi \ + video/index.gph \ + wizard/step1/index.dcgi \ + wizard/step2/index.dcgi \ + wizard/step3/index.dcgi +set +x +cd - +exit 0 ADDED make.sh Index: make.sh ================================================================== --- /dev/null +++ make.sh @@ -0,0 +1,40 @@ +#!/bin/sh +DESTDIR=pharos +SRC=src + +build() { + dir=$1 + in=$2 + out=$3 + echo m4 -I $dir $in \>$out && chmod a+rx $out + m4 -I $dir $in >$out && chmod a+rx $out +} + +# PLAIN +for f in index.gph \ + account/index.dcgi \ + audio/index.gph \ + books/index.gph \ + images/index.gph \ + details/index.dcgi \ + download/index.dcgi \ + list/index.dcgi \ + lists/index.dcgi \ + raw/index.cgi \ + search/index.dcgi \ + software/index.gph \ + sort/index.dcgi \ + video/index.gph \ + wizard/step1/index.dcgi \ + wizard/step2/index.dcgi \ + wizard/step3/index.dcgi +do + build $SRC ${SRC}/${f}.m4 ${DESTDIR}/$f +done + +# WEIRD +build $SRC ${SRC}/raw/index.cgi.m4 ${DESTDIR}/debug/index.cgi +build $SRC ${SRC}/raw/index.cgi.m4 ${DESTDIR}/text/index.cgi +build $SRC ${SRC}/download/index.dcgi.m4 ${DESTDIR}/direct/index.dcgi +build $SRC ${SRC}/raw/index.cgi.m4 ${DESTDIR}/links/index.dcgi +exit 0 Index: readme.txt ================================================================== --- readme.txt +++ readme.txt @@ -34,11 +34,11 @@ ============= To set configuration variables, edit src/config.m4 Installation ============ -Installation depends on make and m4. +Installation depends on m4. -$ make clean -$ make +$ sh clean.sh +$ sh make.sh Copy pharos/ into place