From e00055f1995d9dcfe00ec51b8633037e1f154023 Mon Sep 17 00:00:00 2001 From: Anders Blomdell <anders.blomdell@control.lth.se> Date: Wed, 4 Sep 2019 13:36:27 +0200 Subject: [PATCH] Generate both python2 and python3 versions --- .gitignore | 2 ++ Makefile | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index eca333f..93ef9e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /hostinfo +/hostinfo2 +/hostinfo3 *.bak *.pyc *~ diff --git a/Makefile b/Makefile index 75df8ef..c79034f 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ -TARGETS: hostinfo +TARGETS: hostinfo2 hostinfo3 all: $(TARGETS) -hostinfo: src/hostinfo.py $(sort $(wildcard src/hostinfo/*.py)) Makefile - (cd src ; apa -o ../$@ $(filter %.py, $(^:src/%=%))) +hostinfo2: src/hostinfo.py $(sort $(wildcard src/hostinfo/*.py)) Makefile + (cd src ; apa --interpreter=/usr/bin/python2 \ + -o ../$@ $(filter %.py, $(^:src/%=%))) + +hostinfo3: src/hostinfo.py $(sort $(wildcard src/hostinfo/*.py)) Makefile + (cd src ; apa --interpreter=/usr/bin/python3 \ + -o ../$@ $(filter %.py, $(^:src/%=%))) -- GitLab