%{
//
staload
STDIO = "libc/SATS/stdio.sats"
staload TIME = "libc/SATS/time.sats"
//
dynload "libatsdoc/dynloadall.dats"
//
staload "libatsdoc/SATS/libatsdoc_atext.sats"
//
%}\
%{

fun comment
  (x: string): atext = atext_nil ()
// end of [comment]

fun make_entry
  (nm: string): atext = let
//
val ent = sprintf ("\
all_html:: HTML/%s.html\n\
HTML/%s.html: \
  %s_atxt.exe ; ./$< > $@
%s_atxt.txt: %s.atxt ; $(CAT) $< | \
  $(ATSDOC) --prefix __datatok --outcode htmlgendecl_data_atxt.dats > $@
%s_atxt.exe: htmlgendecl_atxt.dats \
  %s_atxt.txt $(DECLATEXT) $(HTMLGENDECL) ; \
  $(ATSCC) $(INCLUDE) $(INCLATS) $(ATSGCFLAG) -o $@ $< \
    $(DECLATEXT) $(HTMLGENDECL) $(LDPATH) -latsynmark -latsopt -latsdoc -lats -lgmp
upload_%s:: ; \
  scp HTML/%s.html ats-hwxi,ats-lang@web.sourceforge.net:htdocs/LIBRARY/contrib/libats-hwxi/intinf/SATS/DOCUGEN/HTML/
clean:: ; $(RMF) %s_atxt.exe
cleanall:: ; $(RMF) HTML/%s.html
", @(nm, nm, nm, nm, nm, nm, nm, nm, nm, nm, nm)
) // end of [val]
//
in
  atext_strptr (ent)
end // end of [make_entry]

%}\
#
#
# This Makefile is automatically generated
# from executing the following command-line:
#
# make -f Makefile.gen
#
#

######

ATSHOMEQ="$(ATSHOME)"
ATSCC=$(ATSHOMEQ)/bin/atscc
ATSOPT=$(ATSHOMEQ)/bin/atsopt
ATSDOC=$(ATSHOMEQ)/bin/atsdoc

######

PATSHOMEQ="$(PATSHOME)"

######

SHAREDOCU=$(PATSHOMEQ)/share/DOCUGEN

######

LDPATH :=
LDPATH += -L$(PATSHOME)/utils/libatsopt
LDPATH += -L$(PATSHOME)/utils/libatsynmark

######

INCLUDE:=-I $(PATSHOMEQ)/src
INCLATS:=-IATS $(SHAREDOCU) -IATS $(PATSHOMEQ) -IATS $(ATSHOMEQ)

######

CAT=cat

######

all:: all_html

######

DECLATEXT= \\
  declatext_sats.o \\
  declatext_dats.o \\

declatext_sats.o: ; \\
  $(ATSCC) $(INCLUDE) $(INCLATS) -c $(ATSCCFLAGS) $(SHAREDOCU)/declatext.sats
declatext_dats.o: ; \\
  $(ATSCC) $(INCLUDE) $(INCLATS) -c $(ATSCCFLAGS) $(SHAREDOCU)/declatext.dats

######

HTMLGENDECL= \\
  htmlgendecl_sats.o \\
  htmlgendecl_dats.o \\

htmlgendecl_sats.o: ; \\
  $(ATSCC) $(INCLUDE) $(INCLATS) -c $(ATSCCFLAGS) $(SHAREDOCU)/htmlgendecl.sats
htmlgendecl_dats.o: ; \\
  $(ATSCC) $(INCLUDE) $(INCLATS) -c $(ATSCCFLAGS) $(SHAREDOCU)/htmlgendecl.dats

htmlgendecl_atxt.dats: ; \\
  $(ATSDOC) --outcode $@ -i $(SHAREDOCU)/htmlgendecl.atxt > htmlgendecl_atxt.txt

######

all_html::

#make_entry("intinf")
#make_entry("intinf_t")
#make_entry("intinf_vt")

######

uploadall:: ; \
  scp HTML/*.html ats-hwxi,ats-lang@web.sourceforge.net:htdocs/LIBRARY/contrib/libats-hwxi/intinf/SATS/DOCUGEN/HTML/

######

RMF=rm -f

######

clean:: ; $(RMF) *~
clean:: ; $(RMF) *_?ats.o *_?ats.c
clean:: ; $(RMF) *_atxt.txt
clean:: ; $(RMF) *_atxt.dats

cleanall:: clean

###### end of [Makefile] ######
\
%{
implement main () = fprint_filsub (stdout_ref, "Makefile_atxt.txt")
%}\
