From: hachti Date: Mon, 1 May 2006 19:37:43 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=9f86bf48280620f82e50c848f3d281c217f79151;p=h316.git *** empty log message *** --- diff --git a/lib/fortran/Makefile b/lib/fortran/Makefile index c4c0d03..068b9c4 100644 --- a/lib/fortran/Makefile +++ b/lib/fortran/Makefile @@ -1,47 +1,78 @@ -# Skript, das die neue Bibliothek zusammenbauen soll (30.05.05) +# Skript, das die neue Bibliothek zusammenbauen soll (01.01.06) -SRC_DIR = src -OBJ_DIR = obj -LIB_DIR = lib +export SRC_DIR = src +export OBJ_DIR = obj +export LIB_DIR = lib +export RECIPE_DIR = recipe +export RECIPE_SUFFIX=.recipe +export ENDBLOCK=$(H316)/snippets/endseq +export ORG_LIBDIR=original +export ORG_OBJDIR=org -MODULES = uc f$$w4 f$$w1 pchar fpatch lpchar vpunch +export MAKE + +MODULES = uc f$$w4 f$$w1 pchar fpatch lpchar vpunch font FRTN_COMMAND = frtn ASM_COMMAND = asm LDC_COMMAND = ldc -SRC_FILES = $(foreach obj, $(MODULES),$(obj).asm) -OBJ_FILES = $(SRC_FILES:.asm=.obj) -OBJ_FILES_FULL = $(foreach file, $(OBJ_FILES),$(OBJ_DIR)/$(file)) -#OWN_3=$(shell echo $(subst $$,\$$,$(OWN)) | dd conv=ucase 2>/dev/null) + +############# + +#SRC_FILES = $(foreach obj, $(MODULES),$(obj).asm) +#OBJ_FILES = $(SRC_FILES:.asm=.obj) +#OBJ_FILES_FULL = $(foreach file, $(OBJ_FILES),$(OBJ_DIR)/$(file)) + ########################################## -libs : $(OBJ_FILES_FULL) - buildlib.sh -obj : $(OBJ_FILES_FULL) +RECIPES=$(foreach recipe,$(shell ls $(RECIPE_DIR) | grep -v CVS),\ + $(RECIPE_DIR)/$(recipe)) + +LIBS=$(foreach lib,$(basename $(notdir $(RECIPES))),$(LIB_DIR)/$(lib).lib) + +ORG_OBJECTS=$(shell cat $(RECIPES)|egrep -v '^[[:space:]]*(\#.*)*$$'|\ + grep $(ORG_OBJDIR)|sort -u) + +OBJECTS=$(shell cat $(RECIPES)|egrep -v '^[[:space:]]*(\#.*)*$$'|\ + grep $(OBJ_DIR)|sort -u) + +OBJECT_FILES=$(foreach obj, $(MODULES), $(OBJ_DIR)/$(obj).obj) +SOURCE_FILES=$(foreach obj, $(MODULES), $(SRC_DIR)/$(obj).asm) +#************ -$(OBJ_FILES_FULL):$(OBJ_DIR)/%.obj:$(SRC_DIR)/%.asm - @echo Building: $(subst $$,\$$,$@) +all: $(LIBS) + +$(ORG_OBJECTS): $(ORG_LIBDIR)/* + ./buildlib.sh makeorg + +$(OBJECTS): $(OBJECT_FILES) + +$(OBJECT_FILES) : $(OBJ_DIR)/%.obj : $(SRC_DIR)/%.asm + @echo Building: $(subst $$,\$$,$@) @if [ ! -d $(OBJ_DIR) ]; then mkdir $(OBJ_DIR); fi @ rm -f $@ @ cd $(OBJ_DIR) && $(ASM_COMMAND) ../$(subst $$,\$$,$^) @ cd $(OBJ_DIR) && ldc -s -l $(notdir $(subst $$,\$$,$@)) - + +$(LIBS):$(LIB_DIR)/%.lib: $(RECIPE_DIR)/%$(RECIPE_SUFFIX) $(ORG_OBJECTS) $(OBJECTS) + buildlib.sh genlib $(RECIPE_DIR)/$(basename $(notdir $@))$(RECIPE_SUFFIX) + + clean: @echo Cleaning up. @rm -rf $(OBJ_DIR) $(LIB_DIR) *.lst *.go - @rm -f vpunch.asm $(SRC_DIR)/font.asm - @$(MAKE) -s -C vpunch-help clean @buildlib.sh clean vpunch-help/use: vpunch-help/use.c vpunch-help/font_8x16.c $(MAKE) -C vpunch-help use src/font.asm: vpunch-help/use - vpunch-help/use > src/font.asm + vpunch-help/use > $@ + +.PHONY: clean all -.PHONY: clean all org obj libs diff --git a/lib/fortran/buildlib.sh b/lib/fortran/buildlib.sh index 5362d52..5362e87 100755 --- a/lib/fortran/buildlib.sh +++ b/lib/fortran/buildlib.sh @@ -6,9 +6,6 @@ if [ ! "$MAKE" ]; then fi - - - # The suffix for library files (in and out) LIB_SUFFIX=.lib ####################################################################### @@ -46,7 +43,7 @@ genlib(){ rm -f $lib for item in `cat $recipe| egrep -v '^[[:space:]]*(#.*)*$'`; do echo "appending $item." - cat $item >> $lib || (echo "Error! could not find:$item") + cat `echo $item| egrep -o '[^[:space:]].*[^[:space:]]'` >> $lib || (echo "Error! could not find:$item") done cat $ENDBLOCK >> $lib #done diff --git a/lib/fortran/recipe/flib3.recipe b/lib/fortran/recipe/flib3.recipe index c4953ec..40a2c88 100644 --- a/lib/fortran/recipe/flib3.recipe +++ b/lib/fortran/recipe/flib3.recipe @@ -23,4 +23,4 @@ org/F$IO org/F$HT obj/PCHAR obj/LPCHAR - obj/UCHAR \ No newline at end of file + obj/UCHAR diff --git a/systems/build_super3.sh b/systems/build_super3.sh index 88e51e8..a5bf6f0 100755 --- a/systems/build_super3.sh +++ b/systems/build_super3.sh @@ -66,4 +66,3 @@ q EOF h316 $DO_FILE rm -f $DO_FILE -echo dd $FF