aboutsummaryrefslogtreecommitdiff
path: root/bin/initmk
diff options
context:
space:
mode:
Diffstat (limited to 'bin/initmk')
-rwxr-xr-xbin/initmk49
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)