3 /* Macros for organizing packages. */
5 /* HERALD_PACKAGE(MYJUNK)$ will tell the macsyma user and the system
6 which VERSION of your MYJUNK package is being loaded. */
8 eval_when([translate,demo,batch,loadfile],
10 herald_package(name)::=
12 version_no:if tr_true_name_of_file_being_translated#false then
13 ?pathname\-version(tr_true_name_of_file_being_translated)
14 else "version unknown"],
15 (if loadprint then print('name,"source",'version_no),
16 put('name,'version_no,'version)))
19 /* next, a macro that is convenient for making sure a HERALDed package
20 is loaded. It saves a bit of typing. e.g.
21 LOAD_PACKAGE(FOO_STUFF,FOO,FASL,DSK,SHARE) */
23 herald_package(packg)$
25 load_package(name,file_name)::=
26 buildq([name,file_name],
27 if get('name,'version)=false then load(file_name))$
30 /* For address space reasons on MC things which have an autoload
31 property are loaded during translation time only if they
32 have a TRANSLOAD property. This isn't all bad because the
33 the presence of the property can tell you that the form has
34 special handling during translation. Which is not a bad thing to
37 setup_autoload_macro(filename,[l])::=
38 buildq([propsets:maplist(lambda([u],buildq([u],put('u,true,'transload))),l),
40 (setup_autoload(filename,splice(l)),splice(propsets)) )$
42 /* Now, here are the big ones */
44 /* Should have a DEFINE_PACKAGE which sets up
45 (1) Entry points & autoloads.
46 (2) Bulk Translate & compile aids.