diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-12 09:22:01 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-12 09:22:01 -0800 |
commit | ce05175372a9ddca1a225db0765ace1127a39293 (patch) | |
tree | 5988b4d4f6b402e4953945886fc90aae11203df6 /bin/initmk | |
parent | b375f3cdedb5b0e08745d100b40e38d2f8396a58 (diff) |
chore: simplified organizational structurelaptop
Diffstat (limited to 'bin/initmk')
-rwxr-xr-x | bin/initmk | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/bin/initmk b/bin/initmk deleted file mode 100755 index 2ea018f..0000000 --- a/bin/initmk +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/python - -import os -import sys - -NAME = "rules.mk" -TEMPLATE = """include share/push.mk -# Iterate through subdirectory tree - -# Local sources -SRCS_$(d) := -LIBS_$(d) := -BINS_$(d) := -TSTS_$(d) := - -include share/paths.mk - -# Local rules -# $(LIBS_$(d)) = TCFLAGS := -# $(LIBS_$(d)) = TCINCS := -# $(LIBS_$(d)) = TCLIBS := - -$(LIBS_$(d)): $(OBJS_$(d)) - $(ARCHIVE) - -$(BINS_$(d)): $(OBJS_$(d)) - $(LINK) - -$(UNTS_$(d)): $(TOBJS_$(d)) $(LIBS_$(d)) - $(LINK) - -include share/pop.mk""" - -if __name__ == "__main__": - if len(sys.argv) == 2: - dir = sys.argv[1] - if not os.path.exists(dir): - raise ValueError(f"path '{dir}' does not exist") - path = f"{dir}/{NAME}" - elif len(sys.argv) > 2: - raise ValueError("only one argument is accepted") - else: - path = NAME - try: - with open(path, 'x') as makefile: - makefile.write(f"{TEMPLATE}\n") - except: - print("rules.mk already present", file=sys.stderr) - exit(1) |