]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Starting to create distribution build (tarfile ) within Makefile
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 16 Jun 2025 01:30:12 +0000 (21:30 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 16 Jun 2025 01:30:12 +0000 (21:30 -0400)
Makefile
Makefile.dist [new file with mode: 0644]
lib/Makefile

index 82df93f238dbfdb9d7688d7e8b71980f36ea6788..29a8986a2b1e99847b3a5a9c82b76148870c6e17 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,10 @@ clean        :
           @ - rm -fr $(APPNAME)-*
 
 #====================================================================
+#test area Makefile
 include        Makefile.dbg
-#test area sub directory
+#distribution area Makefile
+include        Makefile.dist
 
 #====================================================================
 FEEDPAR        =                                               \
diff --git a/Makefile.dist b/Makefile.dist
new file mode 100644 (file)
index 0000000..6adcbb8
--- /dev/null
@@ -0,0 +1,25 @@
+#Makefile with all necessary to build distribution RPM
+
+
+tarfile        : clean
+         @ echo "Making '$(APLV)' tar file"
+         @ mkdir -p                                    \
+               $(APLV)/app                             \
+               $(APLV)/lib                             \
+               $(APLV)
+         @ date > $(APLV)/$(APLV).build_date
+         @ cp -a Makefile*     $(APLV)/
+         @ cp -a app/Makefile  $(APLV)/app/Makefile
+         @ cp -a lib/Makefile  $(APLV)/lib/Makefile
+         @ tar zcf $(APLV).tar.gz $(APLV)
+         @ echo "'$(APLV)' tar file ready"
+         
+
+
+#====================================================================
+VERSION        =       `grep VERSION lib/numver.h | cut -d'"' -f2`
+RELEASE        =       `grep RELEASE lib/numver.h | cut -d'"' -f2`
+APPN   =       mailleur
+APPV   =       $(VERSION).$(RELEASE)
+APLV   =       $(APPN)-$(APPV)
+#====================================================================
index d6e6ccefe37045cf35d8a019b2b670acc8c7bde5..fc428fd732c7459bdf4bb98300e29cf1725354a7 100644 (file)
@@ -10,7 +10,7 @@ prod  :  toremake
           @ echo "library compiled in '$@' mode, now ready"
 
 clean  :
-          - rm -fr *.o *.a
+          - rm -fr *.o *.a *.tar.gz
 
 #--------------------------------------------------------------------
 #Equivalences