Skip to content

Commit

Permalink
Mamfiles: remove a large amount of redundant cruft
Browse files Browse the repository at this point in the history
This commit gets rid of roughly 700 prerequisite statements that
refer back to a library (mostly libast) that was already built in
another directory -- those like
	make ${PACKAGE_ast_INCLUDE}/ast.h implicit
...and all its own prerequisites. Those are all redundant, because
mamake sorts the directories in the correct build order by scanning
the 'bind -l...' commands in the Mamfile to determine the
dependency hierarchy (see README-mamake.md for info on that). So,
those files are known to exist.

Even if they weren't (e.g. if you deliberately try to build ksh
without building or updating libast first), those prereqs wouldn't
be all that useful. All they can do is error out if one of the
prerequisites is missing. Now, it will error out at compile time
instead, when the #include fails. Big deal.

This commit also gets rid of some prerequisites marked with the
attributes "implicit dontcare virtual". Those have no effect. They
refer to system headers on certain OSs, not to files we ship.
  • Loading branch information
McDutchie committed Feb 7, 2024
1 parent 0a2e5d4 commit ce6c125
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 699 deletions.
80 changes: 0 additions & 80 deletions src/cmd/builtin/Mamfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,86 +28,6 @@ make install virtual
prev features/pty
exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} ${mam_libcmd} : run features/pty
done
prev ${PACKAGE_ast_INCLUDE}/ast_time.h implicit
make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
make ${PACKAGE_ast_INCLUDE}/endian.h implicit
make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h
done
done
done
make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
make ${PACKAGE_ast_INCLUDE}/regex.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
prev ${PACKAGE_ast_INCLUDE}/endian.h
make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h
done
done
done
make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h
done
done
prev ${PACKAGE_ast_INCLUDE}/ast_common.h
done
prev ${PACKAGE_ast_INCLUDE}/ast_common.h
done
make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
done
prev ${PACKAGE_ast_INCLUDE}/ast_map.h
prev ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
done
prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h
make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
prev ${PACKAGE_ast_INCLUDE}/getopt.h
prev ${PACKAGE_ast_INCLUDE}/endian.h
done
prev ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_common.h
done
done
prev ${PACKAGE_ast_INCLUDE}/regex.h
make ${PACKAGE_ast_INCLUDE}/proc.h implicit
make ${PACKAGE_ast_INCLUDE}/ast.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_api.h
prev ${PACKAGE_ast_INCLUDE}/vmalloc.h
make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
prev ${PACKAGE_ast_INCLUDE}/sfio_s.h
prev ${PACKAGE_ast_INCLUDE}/ast_common.h
prev ${PACKAGE_ast_INCLUDE}/ast_std.h
done
prev ${PACKAGE_ast_INCLUDE}/ast_std.h
done
done
make ${PACKAGE_ast_INCLUDE}/error.h implicit
make ${PACKAGE_ast_INCLUDE}/option.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast.h
done
prev ${PACKAGE_ast_INCLUDE}/ast.h
done
make ${PACKAGE_ast_INCLUDE}/cmd.h implicit
make ${PACKAGE_ast_INCLUDE}/cmdext.h implicit
prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
done
prev ${PACKAGE_ast_INCLUDE}/shcmd.h
make ${PACKAGE_ast_INCLUDE}/stk.h implicit
prev ${PACKAGE_ast_INCLUDE}/sfio.h
done
prev ${PACKAGE_ast_INCLUDE}/error.h
prev ${PACKAGE_ast_INCLUDE}/ast.h
done
done pty.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""builtin"\" -DCMD_STANDALONE=b_pty -c pty.c
done pty.o
Expand Down
Loading

0 comments on commit ce6c125

Please sign in to comment.